'use client'; import { Grid, Loading, Column, Row } from '@umami/react-zen'; import Script from 'next/script'; import { UpdateNotice } from './UpdateNotice'; import { SideNav } from '@/app/(main)/SideNav'; import { useLoginQuery, useConfig, useNavigation } from '@/components/hooks'; import { MobileNav } from '@/app/(main)/MobileNav'; export function App({ children }) { const { user, isLoading, error } = useLoginQuery(); const config = useConfig(); const { pathname } = useNavigation(); if (isLoading || !config) { return ; } if (error) { window.location.href = `${process.env.basePath || ''}/login`; return null; } if (!user || !config) { return null; } return ( {children} {process.env.NODE_ENV === 'production' && !pathname.includes('/share/') && (