video-flow-b/app/layout.tsx
2025-07-03 05:51:09 +08:00

46 lines
1.3 KiB
TypeScript

import './globals.css';
import type { Metadata } from 'next';
import { ThemeProvider } from '@/components/theme-provider';
import { Toaster } from '@/components/ui/sonner';
import dynamic from 'next/dynamic';
// Import the OAuthCallbackHandler dynamically to ensure it only runs on the client
const OAuthCallbackHandler = dynamic(
() => import('@/components/ui/oauth-callback-handler'),
{ ssr: false }
);
// Import dev helper in development environment only
const DevHelper = dynamic(
() => import('@/utils/dev-helper').then(() => ({ default: () => null })),
{ ssr: false }
);
export const metadata: Metadata = {
title: 'AI Movie Flow - Create Amazing Videos with AI',
description: 'Professional AI-powered video creation platform with advanced editing tools',
};
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en" suppressHydrationWarning>
<body className="font-sans antialiased">
<ThemeProvider
attribute="class"
defaultTheme="dark"
enableSystem
disableTransitionOnChange
>
{children}
<Toaster />
<OAuthCallbackHandler />
{process.env.NODE_ENV === 'development' && <DevHelper />}
</ThemeProvider>
</body>
</html>
);
}