Skip to content

Commit

Permalink
feat: add association page
Browse files Browse the repository at this point in the history
  • Loading branch information
NoeTerrier committed Mar 16, 2024
1 parent 6128d02 commit e07e469
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/src/pages/association.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof getServerSideProps>
) {
const router = useRouter();
Expand All @@ -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)
),
Expand All @@ -35,4 +36,6 @@ export const getServerSideProps: GetServerSideProps<{
.then((result) =>
result.map((s) => s.social_links_id)
)) as SocialLink[],
}}});
},
};
});

0 comments on commit e07e469

Please sign in to comment.