show some featured images
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user