Compare commits
2 Commits
e4c0558527
...
a3d71b18da
| Author | SHA1 | Date | |
|---|---|---|---|
| a3d71b18da | |||
| 7f95d8e252 |
@@ -16,6 +16,7 @@ const nextConfig = {
|
|||||||
hostname: "**",
|
hostname: "**",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
formats: ["image/avif", "image/webp"],
|
||||||
dangerouslyAllowLocalIP: process.env.NODE_ENV === "development",
|
dangerouslyAllowLocalIP: process.env.NODE_ENV === "development",
|
||||||
},
|
},
|
||||||
turbopack: {
|
turbopack: {
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export const EventItem = ({
|
|||||||
mode,
|
mode,
|
||||||
size,
|
size,
|
||||||
imageLoading,
|
imageLoading,
|
||||||
|
imageFetchPriority,
|
||||||
}: {
|
}: {
|
||||||
event:
|
event:
|
||||||
| SingularEvent
|
| SingularEvent
|
||||||
@@ -31,6 +32,7 @@ export const EventItem = ({
|
|||||||
mode: "list" | "calendar" | "singular-time-only";
|
mode: "list" | "calendar" | "singular-time-only";
|
||||||
size?: "small" | "medium" | "large";
|
size?: "small" | "medium" | "large";
|
||||||
imageLoading?: "eager" | "lazy";
|
imageLoading?: "eager" | "lazy";
|
||||||
|
imageFetchPriority?: "high" | "low" | "auto";
|
||||||
}) => {
|
}) => {
|
||||||
const futureOccurrences = getFutureOccurrences(event);
|
const futureOccurrences = getFutureOccurrences(event);
|
||||||
const groupedOccurrences = groupConsecutiveDates(
|
const groupedOccurrences = groupConsecutiveDates(
|
||||||
@@ -55,6 +57,7 @@ export const EventItem = ({
|
|||||||
height={0}
|
height={0}
|
||||||
sizes="(max-width: 900px) 100vw, 25vw"
|
sizes="(max-width: 900px) 100vw, 25vw"
|
||||||
loading={imageLoading}
|
loading={imageLoading}
|
||||||
|
fetchPriority={imageFetchPriority}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,8 +9,14 @@ export const FeaturedEvents = ({ events }: { events: EventListItemFragment[] })
|
|||||||
<section className={styles.featuredEvents}>
|
<section className={styles.featuredEvents}>
|
||||||
<SectionHeader heading="Arrangementer" link="/arrangementer" linkText="Se alle arrangementer" />
|
<SectionHeader heading="Arrangementer" link="/arrangementer" linkText="Se alle arrangementer" />
|
||||||
<ul className={styles.eventList}>
|
<ul className={styles.eventList}>
|
||||||
{events.slice(0, 3).map((event) => (
|
{events.slice(0, 3).map((event, index) => (
|
||||||
<EventItem key={event.id} event={event} mode="list" imageLoading="eager" />
|
<EventItem
|
||||||
|
key={event.id}
|
||||||
|
event={event}
|
||||||
|
mode="list"
|
||||||
|
imageLoading="eager"
|
||||||
|
imageFetchPriority={index < 2 ? "high" : undefined}
|
||||||
|
/>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
<SectionFooter link="/arrangementer" linkText="Se alle arrangementer" />
|
<SectionFooter link="/arrangementer" linkText="Se alle arrangementer" />
|
||||||
|
|||||||
Reference in New Issue
Block a user