Skip to content

Commit

Permalink
Updated image issue in Article.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
dhawal-793 committed May 5, 2023
1 parent 111028f commit 4cb2cf2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/Article.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import FAC from "../public/FAC.png"
import ReadMoreButton from "./ReadMoreButton"

type Props = {
article: Article
}

const Article = ({ article }: Props) => {
const ImageSrc = article.image !== null ? article.image : FAC
const ImageSrc = article.image ? article.image : "/FAC.png"
return (
<article className="bg-slate-200 dark:bg-slate-800 flex flex-col shadow-md shadow-slate-400 dark:shadow-slate-700 hover:shadow-xl hover:shadow-slate-400 dark:hover:shadow-slate-700 hover:bg-slate-300/70 dark:hover:bg-slate-700/50 transition-all duration-200 ease-out rounded-lg max-w-md mx-auto">
<img src={ImageSrc} alt={article.title} loading="lazy" className="h-60 w-full object-cover rounded-t-lg " />
Expand Down

0 comments on commit 4cb2cf2

Please sign in to comment.