import { useEffect } from 'react'; import { AnimatePresence } from 'framer-motion'; import { useAuthStore } from './modules/auth/application/authStore'; import AuthPage from './modules/auth/presentation/AuthPage'; import ChatPage from './modules/chats/presentation/ChatPage'; import AdminPage from './modules/admin/presentation/pages/AdminPage'; import NotificationProvider from './core/presentation/components/ui/NotificationProvider'; export default function App() { const { token, user, checkAuth, isLoading } = useAuthStore(); useEffect(() => { checkAuth(); }, [checkAuth]); if (isLoading) { return (

Knot Loading

); } // Simple routing for admin if (window.location.pathname.startsWith('/admin')) { return ; } return ( <> {token && user ? ( ) : ( )} ); } function AppLoader() { return (
); }