This commit is contained in:
2026-08-12 19:30:17 +03:00
parent 40c324d7fe
commit b0b7196518
152 changed files with 24657 additions and 0 deletions

52
src/App.tsx Normal file
View File

@@ -0,0 +1,52 @@
import { useEffect } from 'react';
import { RouterProvider } from 'react-router-dom';
import { Toaster } from 'react-hot-toast';
import { router } from './router';
import { useAuthStore, useUIStore } from './store';
function App() {
const { initialize } = useAuthStore();
const { resolvedTheme } = useUIStore();
// Initialize auth on mount
useEffect(() => {
initialize();
}, [initialize]);
// Apply theme class to document
useEffect(() => {
document.documentElement.classList.remove('light', 'dark');
document.documentElement.classList.add(resolvedTheme);
}, [resolvedTheme]);
return (
<>
<RouterProvider router={router} />
<Toaster
position="top-right"
toastOptions={{
className: '',
style: {
background: 'hsl(var(--card))',
color: 'hsl(var(--foreground))',
border: '1px solid hsl(var(--border))',
},
success: {
iconTheme: {
primary: 'hsl(142 71% 45%)',
secondary: 'hsl(var(--card))',
},
},
error: {
iconTheme: {
primary: 'hsl(0 84.2% 60.2%)',
secondary: 'hsl(var(--card))',
},
},
}}
/>
</>
);
}
export default App;