From e07e4693470afe4104020dbe75e9a29a38e481d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Terrier?= Date: Sat, 16 Mar 2024 12:08:36 +0100 Subject: [PATCH] feat: add association page --- app/src/pages/association.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/pages/association.tsx b/app/src/pages/association.tsx index 3d770f7..9eeb38c 100644 --- a/app/src/pages/association.tsx +++ b/app/src/pages/association.tsx @@ -6,7 +6,7 @@ import { readItems, readSingleton } from "@directus/sdk"; import { GetServerSideProps, InferGetServerSidePropsType } from "next"; import { useRouter } from "next/router"; -export default function Association( +export default function AssociationPage( props: InferGetServerSidePropsType ) { const router = useRouter(); @@ -22,7 +22,8 @@ export const getServerSideProps: GetServerSideProps<{ association: Association; social_links: SocialLink[]; }> = populateLayoutProps(async (context) => { - return { props: { + return { + props: { association: await directus().request( readSingleton("association", queryTranslations) ), @@ -35,4 +36,6 @@ export const getServerSideProps: GetServerSideProps<{ .then((result) => result.map((s) => s.social_links_id) )) as SocialLink[], -}}}); + }, + }; +});