Skip to content

Commit

Permalink
Fixing types
Browse files Browse the repository at this point in the history
  • Loading branch information
alexristinmaa committed Dec 8, 2024
1 parent 5065a33 commit c896288
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion alexanderristinmaa/app/[lang]/(homepage)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion alexanderristinmaa/app/[lang]/(homepage)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion alexanderristinmaa/app/[lang]/hemligt/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion alexanderristinmaa/app/[lang]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<html lang={lang}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit c896288

Please sign in to comment.