Files
smart-crop-ui/crop-x/src/app/layout.tsx

28 lines
716 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use client';
import { useEffect } from 'react';
import { AuthProvider } from '@/components/auth/AuthContext';
import { ClientAuthInterceptor } from '@/components/auth/ClientAuthInterceptor';
export default function AppLayout({
children,
}: {
children: React.ReactNode
}) {
// 使用useEffect确保主题只在客户端设置避免水合问题
useEffect(() => {
// 可以在这里添加客户端特定的初始化逻辑
}, []);
return (
<html lang="zh-CN" suppressHydrationWarning>
<body suppressHydrationWarning>
<AuthProvider>
<ClientAuthInterceptor>
{children}
</ClientAuthInterceptor>
</AuthProvider>
</body>
</html>
)
}