生产管理系统 - 2种角色的登录

This commit is contained in:
2025-10-31 14:52:30 +08:00
parent 46ff61eaed
commit ad600ce059
7 changed files with 371 additions and 25 deletions

View File

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