Skip to content

Commit

Permalink
add ternario para cards sin imagen
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignaherrero committed May 4, 2022
1 parent f857c3d commit 689df1a
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions components/card/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,21 @@ export default function Card({ articles: { data, found } }) {
key={id}
>
<a href="#!">
<Image
className="rounded-t-lg object-cover h-64 w-full"
src={featured_media.medium}
alt=""
width={384}
height={200}
priority={true}
loading="eager"
/>
{featured_media ? (
<Image
className="rounded-t-lg object-cover h-64 w-full"
src={featured_media.medium}
alt=""
width={384}
height={200}
priority={true}
loading="eager"
/>
) : (
<p className="text-center pt-20 pb-20">
Ups! esta publicacion no tiene imagen
</p>
)}
</a>
<div className="pt-6 pl-6 pr-6 pb-10">
<h5 className="text-gray-900 text-xl font-medium mb-2">
Expand Down

1 comment on commit 689df1a

@vercel
Copy link

@vercel vercel bot commented on 689df1a May 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

challenge-atomik – ./

challenge-atomik-nacho93.vercel.app
challenge-atomik-git-main-nacho93.vercel.app
challenge-atomik.vercel.app

Please sign in to comment.