Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst committed Jun 3, 2024
1 parent 4986081 commit dcaf0e6
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 54 deletions.
1 change: 1 addition & 0 deletions src/lib/content/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Link from "@/components/link.astro";

export function useMDXComponents(): MDXComponents {
return {
// @ts-expect-error It's fine.
a: Link,
Callout,
Download,
Expand Down
120 changes: 66 additions & 54 deletions src/pages/[locale]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,17 @@ const { hero } = page;
const event = await reader().collections[collectionName].readOrThrow(id);

return (
<Card
image={event.image}
title={event.title}
summary={event.summary}
link={{
label: t("IndexPage.card.read-more"),
href: `/events/${id}`,
}}
/>
<li>
<Card
image={event.image}
title={event.title}
summary={event.summary}
link={{
label: t("IndexPage.card.read-more"),
href: `/events/${id}`,
}}
/>
</li>
);
}

Expand All @@ -109,15 +111,17 @@ const { hero } = page;
await reader().collections[collectionName].readOrThrow(id);

return (
<Card
image={newsItem.image}
title={newsItem.title}
summary={newsItem.summary}
link={{
label: t("IndexPage.card.read-more"),
href: `/news/${id}`,
}}
/>
<li>
<Card
image={newsItem.image}
title={newsItem.title}
summary={newsItem.summary}
link={{
label: t("IndexPage.card.read-more"),
href: `/news/${id}`,
}}
/>
</li>
);
}

Expand All @@ -127,15 +131,17 @@ const { hero } = page;
const page = await reader().collections[collectionName].readOrThrow(id);

return (
<Card
image={page.image}
title={page.title}
summary={page.summary || t("IndexPage.card.no-summary")}
link={{
label: t("IndexPage.card.read-more"),
href: `/${id}`,
}}
/>
<li>
<Card
image={page.image}
title={page.title}
summary={page.summary || t("IndexPage.card.no-summary")}
link={{
label: t("IndexPage.card.read-more"),
href: `/${id}`,
}}
/>
</li>
);
}

Expand Down Expand Up @@ -170,15 +176,17 @@ const { hero } = page;
const event = await reader().collections[collectionName].readOrThrow(id);

return (
<Card
image={event.image}
title={event.title}
summary={event.summary}
link={{
label: t("IndexPage.card.read-more"),
href: `/events/${id}`,
}}
/>
<li>
<Card
image={event.image}
title={event.title}
summary={event.summary}
link={{
label: t("IndexPage.card.read-more"),
href: `/events/${id}`,
}}
/>
</li>
);
}

Expand All @@ -189,15 +197,17 @@ const { hero } = page;
await reader().collections[collectionName].readOrThrow(id);

return (
<Card
image={newsItem.image}
title={newsItem.title}
summary={newsItem.summary}
link={{
label: t("IndexPage.card.read-more"),
href: `/news/${id}`,
}}
/>
<li>
<Card
image={newsItem.image}
title={newsItem.title}
summary={newsItem.summary}
link={{
label: t("IndexPage.card.read-more"),
href: `/news/${id}`,
}}
/>
</li>
);
}

Expand All @@ -207,15 +217,17 @@ const { hero } = page;
const page = await reader().collections[collectionName].readOrThrow(id);

return (
<Card
image={page.image}
title={page.title}
summary={page.summary || t("IndexPage.card.no-summary")}
link={{
label: t("IndexPage.card.read-more"),
href: `/${id}`,
}}
/>
<li>
<Card
image={page.image}
title={page.title}
summary={page.summary || t("IndexPage.card.no-summary")}
link={{
label: t("IndexPage.card.read-more"),
href: `/${id}`,
}}
/>
</li>
);
}

Expand Down

0 comments on commit dcaf0e6

Please sign in to comment.