File tree Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -183,8 +183,36 @@ const SingleBlogView = () => {
183183 ) }
184184 </ div >
185185 </ div >
186- { id && < BlogReaction blogId = { id } /> }
187- { id && < BlogComment blogId = { id } /> }
186+ {
187+ userId ? (
188+ < >
189+ { id && < BlogReaction blogId = { id } /> }
190+ { id && < BlogComment blogId = { id } /> }
191+ </ >
192+ ) :(
193+ < div className = "py-4" >
194+ < p className = "text-sm dark:text-slate-300" >
195+ Please{ " " }
196+ < a
197+ href = "/"
198+ className = "text-green hover:text-green-700"
199+ >
200+ log in
201+ </ a > { " " }
202+ or{ " " }
203+ < a
204+ href = "/"
205+ className = "text-green hover:text-green-700"
206+ >
207+ create an account
208+ </ a > { " " }
209+ to like or comment.
210+ </ p >
211+ </ div >
212+
213+ )
214+ }
215+
188216 { topArticles && topArticles . length > 0 ? (
189217 < div className = 'mt-10' >
190218 < h1 > Related Articles</ h1 >
You can’t perform that action at this time.
0 commit comments