fix(data): 增加全局保存失败保护
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { Sidebar } from '@/components/layout/Sidebar';
|
||||
import { AuthGuard } from '@/components/AuthGuard';
|
||||
import { ServerDataSaveErrorBanner } from '@/components/ServerDataSaveErrorBanner';
|
||||
|
||||
export function LayoutShell({ children }: { children: React.ReactNode }) {
|
||||
const pathname = usePathname();
|
||||
@@ -10,6 +11,7 @@ export function LayoutShell({ children }: { children: React.ReactNode }) {
|
||||
|
||||
return (
|
||||
<AuthGuard>
|
||||
<ServerDataSaveErrorBanner />
|
||||
{isLoginPage ? (
|
||||
<>{children}</>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user