Skip to content

Commit

Permalink
Fixed frontend for empty uploaded img
Browse files Browse the repository at this point in the history
Signed-off-by: Akash Singh <[email protected]>
  • Loading branch information
SkySingh04 committed May 8, 2024
1 parent 60f9733 commit 8297d25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/app/blogs/[blogid]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ const Page = () => {
isBlog={true}
onClose={() => setIsVisible(false)}
/>}
<img src={blog.uploadedImageLink} alt={blog.title} width={500} height={500} className='m-8 transform scale-100 hover:scale-110 transition duration-300 ease-in-out' />
{blog.uploadedImageLink!='' && blog.uploadedImageLink!=null && blog.uploadedImageLink!=undefined && blog.uploadedImageLink!='null' && blog.uploadedImageLink!='undefined' && blog.uploadedImageLink!='NULL' && blog.uploadedImageLink!='UNDEFINED' &&
(<img src={blog.uploadedImageLink} alt={blog.title} width={500} height={500} className='m-8 transform scale-100 hover:scale-110 transition duration-300 ease-in-out' />
)}
<div className="flex items-center justify-end text-right mt-4 flex-col">
<p className="text-bt-teal">Written By: {user?.Username}</p>
<p className="text-bt-teal">Published On: {formattedDate}</p>
Expand Down

0 comments on commit 8297d25

Please sign in to comment.