'use client'; import { Grid, Loading } from '@umami/react-zen'; import Script from 'next/script'; import { usePathname } from 'next/navigation'; import { UpdateNotice } from './UpdateNotice'; import { Nav } from '@/app/(main)/Nav'; import { NavBar } from '@/app/(main)/NavBar'; import { Page } from '@/components/layout/Page'; import { useLogin, useConfig } from '@/components/hooks'; export function App({ children }) { const { user, isLoading, error } = useLogin(); const config = useConfig(); const pathname = usePathname(); if (isLoading) { return ; } if (error) { window.location.href = `${process.env.basePath || ''}/login`; } if (!user || !config) { return null; } if (config.uiDisabled) { return null; } return (