From c896288dcfe4e23a5cad3b421b06e69282104d78 Mon Sep 17 00:00:00 2001 From: matrixthecow Date: Mon, 9 Dec 2024 00:22:57 +0100 Subject: [PATCH] Fixing types --- alexanderristinmaa/app/[lang]/(homepage)/layout.tsx | 2 +- alexanderristinmaa/app/[lang]/(homepage)/page.tsx | 2 +- alexanderristinmaa/app/[lang]/hemligt/page.tsx | 2 +- alexanderristinmaa/app/[lang]/layout.tsx | 2 +- alexanderristinmaa/app/experiments/[experiment]/info/page.tsx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/alexanderristinmaa/app/[lang]/(homepage)/layout.tsx b/alexanderristinmaa/app/[lang]/(homepage)/layout.tsx index 6f37cbd..38382a8 100644 --- a/alexanderristinmaa/app/[lang]/(homepage)/layout.tsx +++ b/alexanderristinmaa/app/[lang]/(homepage)/layout.tsx @@ -17,7 +17,7 @@ export default async function RootLayout({ children: React.ReactNode, params: Promise<{lang: string}> }>) { - const lang = (await params).lang; + const {lang} = await params; const dict = await getDictionary(lang); return ( diff --git a/alexanderristinmaa/app/[lang]/(homepage)/page.tsx b/alexanderristinmaa/app/[lang]/(homepage)/page.tsx index c42ea7c..b179236 100644 --- a/alexanderristinmaa/app/[lang]/(homepage)/page.tsx +++ b/alexanderristinmaa/app/[lang]/(homepage)/page.tsx @@ -19,7 +19,7 @@ export default async function Home({params} : {params: Promise<{lang: string}> } .map(v => ({metadata: parseMD(v.data).metadata as any, experiment: v.experiment})); } - const lang = (await params).lang; + const {lang} = await params; const dict = await getDictionary(lang); return ( diff --git a/alexanderristinmaa/app/[lang]/hemligt/page.tsx b/alexanderristinmaa/app/[lang]/hemligt/page.tsx index 4a31d58..cd7f6db 100644 --- a/alexanderristinmaa/app/[lang]/hemligt/page.tsx +++ b/alexanderristinmaa/app/[lang]/hemligt/page.tsx @@ -3,7 +3,7 @@ import Catimation from './catimation'; import { getDictionary } from '../dictionaries'; export default async function Home({params} : {params: Promise<{lang: string}> }) { - const lang = (await params).lang; + const {lang} = await params; const dict = await getDictionary(lang); return ( diff --git a/alexanderristinmaa/app/[lang]/layout.tsx b/alexanderristinmaa/app/[lang]/layout.tsx index 1f54414..c6fd3fb 100644 --- a/alexanderristinmaa/app/[lang]/layout.tsx +++ b/alexanderristinmaa/app/[lang]/layout.tsx @@ -5,7 +5,7 @@ export async function generateStaticParams() { } export default async function Root({ children, params } : { children: React.ReactNode, params: Promise<{lang: string}> }) { - const lang = (await params).lang; + const {lang} = await params; return ( diff --git a/alexanderristinmaa/app/experiments/[experiment]/info/page.tsx b/alexanderristinmaa/app/experiments/[experiment]/info/page.tsx index fc7566d..490a054 100644 --- a/alexanderristinmaa/app/experiments/[experiment]/info/page.tsx +++ b/alexanderristinmaa/app/experiments/[experiment]/info/page.tsx @@ -23,7 +23,7 @@ export function generateStaticParams() { // Multiple versions of this page will be statically generated // using the `params` returned by `generateStaticParams` -export default async function Page({ params } : { params: { experiment: string } }) { +export default async function Page({ params } : { params: Promise<{experiment: string}> }) { const { experiment } = await params; const markdownString = fs.readFileSync(`./app/experiments/${experiment}/page.md`, 'utf8');