From 724ebdebfa204ce159e9ad134daa452d109913ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Terrier?= Date: Sat, 16 Mar 2024 12:11:29 +0100 Subject: [PATCH] refactor: remove useless variables --- app/src/pages/association.tsx | 4 +--- app/src/pages/commissions.tsx | 2 +- app/src/pages/index.tsx | 2 +- app/src/pages/news.tsx | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/pages/association.tsx b/app/src/pages/association.tsx index 9eeb38c..cc875da 100644 --- a/app/src/pages/association.tsx +++ b/app/src/pages/association.tsx @@ -4,12 +4,10 @@ import { queryTranslations } from "@/locales"; import { Association, SocialLink } from "@/types/aliases"; import { readItems, readSingleton } from "@directus/sdk"; import { GetServerSideProps, InferGetServerSidePropsType } from "next"; -import { useRouter } from "next/router"; export default function AssociationPage( props: InferGetServerSidePropsType ) { - const router = useRouter(); return ( = populateLayoutProps(async (context) => { +}> = populateLayoutProps(async (_) => { return { props: { association: await directus().request( diff --git a/app/src/pages/commissions.tsx b/app/src/pages/commissions.tsx index 366bcc5..3745051 100644 --- a/app/src/pages/commissions.tsx +++ b/app/src/pages/commissions.tsx @@ -29,7 +29,7 @@ export default function Commissions( export const getServerSideProps: GetServerSideProps<{ news: Commission[]; -}> = populateLayoutProps(async (context) => { +}> = populateLayoutProps(async (_) => { const c = await directus().request( readItems("commissions", { fields: ["*", { translations: ["*"] }], diff --git a/app/src/pages/index.tsx b/app/src/pages/index.tsx index c2f57d6..0ed34df 100644 --- a/app/src/pages/index.tsx +++ b/app/src/pages/index.tsx @@ -80,7 +80,7 @@ export const getServerSideProps: GetServerSideProps<{ social_links: SocialLink[]; news: News[]; committee: (AssociationMembership & { member: Member })[]; -}> = populateLayoutProps(async (context) => { +}> = populateLayoutProps(async (_) => { return { props: { association: await directus().request( diff --git a/app/src/pages/news.tsx b/app/src/pages/news.tsx index fecd023..bd7c42a 100644 --- a/app/src/pages/news.tsx +++ b/app/src/pages/news.tsx @@ -22,7 +22,7 @@ export default function NewsComponent( export const getServerSideProps: GetServerSideProps<{ news: News[]; -}> = populateLayoutProps(async (context) => { +}> = populateLayoutProps(async (_) => { return { props: { news: await directus().request(