- Remove duplicate route files that conflicted with App Router - Create client-side Providers wrapper for React context providers - Update app/layout.tsx to use client wrapper for providers - Fix next/font import in pages/_app.tsx This resolves the routing conflicts and React context errors when running the app with both Pages and App routers. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
43 lines
No EOL
1.1 KiB
TypeScript
43 lines
No EOL
1.1 KiB
TypeScript
import { Metadata } from 'next'
|
|
import localFont from 'next/font/local'
|
|
import { Viewport } from '@radix-ui/react-toast'
|
|
|
|
import '../styles/globals.scss'
|
|
|
|
// Components
|
|
import Providers from './components/Providers'
|
|
import Header from './components/Header'
|
|
import UpdateToastClient from './components/UpdateToastClient'
|
|
|
|
// Metadata
|
|
export const metadata: Metadata = {
|
|
title: 'granblue.team',
|
|
description: 'Create, save, and share Granblue Fantasy party compositions',
|
|
viewport: 'viewport-fit=cover, width=device-width, initial-scale=1.0',
|
|
}
|
|
|
|
// Font
|
|
const goalking = localFont({
|
|
src: '../pages/fonts/gk-variable.woff2',
|
|
fallback: ['system-ui', 'inter', 'helvetica neue', 'sans-serif'],
|
|
variable: '--font-goalking',
|
|
})
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode
|
|
}) {
|
|
return (
|
|
<html lang="en" className={goalking.variable}>
|
|
<body className={goalking.className}>
|
|
<Providers>
|
|
<Header />
|
|
<UpdateToastClient />
|
|
<main>{children}</main>
|
|
<Viewport className="ToastViewport" />
|
|
</Providers>
|
|
</body>
|
|
</html>
|
|
)
|
|
} |