Updated nextjs version

This commit is contained in:
2025-09-03 13:36:36 +02:00
parent 5019b80c1f
commit a5cfbed065
10 changed files with 49 additions and 182 deletions

View File

@@ -1,7 +1,7 @@
import Header from "@/components/header"
import { ReactNode } from "react"
export default function RootLayout({ children }: Readonly<{ children: ReactNode }>) {
export default function RootLayout({ children }: LayoutProps<"/">) {
return (
<>
<Header />

View File

@@ -1,7 +1,7 @@
import Header from "@/components/header"
import { ReactNode } from "react"
export default function StatsLayout({ children }: Readonly<{ children: ReactNode }>) {
export default function StatsLayout({ children }: LayoutProps<"/">) {
return (
<>
<Header searchBar />

View File

@@ -20,7 +20,7 @@ export async function generateMetadata({ params }: { params: Promise<{ ign: stri
return { title: user !== null ? user.name : "Player not found" }
}
export default async function PlayerPage({ params }: { params: Promise<{ ign: string }> }) {
export default async function PlayerPage({ params }: PageProps<"/player/[ign]">) {
const { ign } = await params
return (

View File

@@ -3,7 +3,6 @@ import "./globals.css"
import ThemeProvider from "@/components/ThemeProvider"
import { Toaster } from "@/components/ui/sonner"
import type { Metadata } from "next"
import { ReactNode } from "react"
export const metadata: Metadata = {
title: {
@@ -12,7 +11,7 @@ export const metadata: Metadata = {
}
}
export default function RootLayout({ children }: Readonly<{ children: ReactNode }>) {
export default function RootLayout({ children }: LayoutProps<"/">) {
return (
<html lang="en" suppressHydrationWarning>
<head>