feat(frontend): add react spa with wishlist flows and public profile

This commit is contained in:
Anton
2026-04-23 16:05:27 +03:00
parent 5f6a551b6c
commit 00f01611ed
44 changed files with 2166 additions and 0 deletions

34
apps/frontend/src/App.tsx Normal file
View File

@@ -0,0 +1,34 @@
import { useEffect } from 'react';
import { RouterProvider } from 'react-router-dom';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { Toaster } from 'sonner';
import { router } from './routes';
import { useAuthStore } from './features/auth/authStore';
const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
retry: 1,
},
},
});
function AuthBoot({ children }: { children: React.ReactNode }) {
const init = useAuthStore((s) => s.init);
useEffect(() => {
void init();
}, [init]);
return <>{children}</>;
}
export function App() {
return (
<QueryClientProvider client={queryClient}>
<AuthBoot>
<RouterProvider router={router} />
</AuthBoot>
<Toaster position="top-center" richColors closeButton />
</QueryClientProvider>
);
}