💄 Add conditional rendering for image

This commit is contained in:
Manuel
2023-03-07 19:52:56 +01:00
parent 749f492034
commit 13999e44eb

View File

@@ -137,15 +137,17 @@ function RssTile({ widget }: RssTileProps) {
)} )}
<Flex gap="xs"> <Flex gap="xs">
<MediaQuery query="(max-width: 1200px)" styles={{ display: 'none' }}> {item.enclosure && (
<Image <MediaQuery query="(max-width: 1200px)" styles={{ display: 'none' }}>
src={item.enclosure?.url ?? undefined} <Image
width={140} src={item.enclosure?.url ?? undefined}
height={140} width={140}
radius="md" height={140}
withPlaceholder radius="md"
/> withPlaceholder
</MediaQuery> />
</MediaQuery>
)}
<Flex gap={2} direction="column"> <Flex gap={2} direction="column">
{item.categories && ( {item.categories && (
<Flex gap="xs" wrap="wrap" h={20} style={{ overflow: 'hidden' }}> <Flex gap="xs" wrap="wrap" h={20} style={{ overflow: 'hidden' }}>