show some featured images

This commit is contained in:
2024-05-10 16:20:19 +02:00
parent db8c88ffba
commit de0af201cc
11 changed files with 73 additions and 12 deletions

View File

@ -1,11 +1,23 @@
import { EventFragment } from "@/gql/graphql";
import styles from "./eventItem.module.scss";
import Link from "next/link";
import Image from "../general/Image";
export const EventItem = ({ event }: { event: EventFragment }) => {
return (
<li className={`${styles.eventItem} linkItem`}>
<div className={styles.image}></div>
<div className={styles.image}>
{event.featuredImage && (
<Image
src={event.featuredImage.url}
alt=""
width={0}
height={0}
sizes="20vw"
// style={{ width: '100%', height: 'auto' }} // optional
/>
)}
</div>
<div className={styles.text}>
<h1 className={styles.title}>{event.title}</h1>
<p className={styles.details}>Detaljer og tidspunkt</p>