import { useEffect } from 'react'; import { AnimatePresence } from 'framer-motion'; import { useAuthStore } from './stores/authStore'; import AuthPage from './pages/AuthPage'; import ChatPage from './pages/ChatPage'; export default function App() { const { token, user, checkAuth, isLoading } = useAuthStore(); useEffect(() => { checkAuth(); }, [checkAuth]); if (isLoading) { return (

Загрузка...

); } return ( {token && user ? ( ) : ( )} ); } function VortexLoader() { return (
); }