fix
Some checks failed
Build and Publish Images / build-and-push (push) Has been cancelled

This commit is contained in:
arrelin
2026-01-17 13:10:03 +03:00
parent 35e79de378
commit 514ced6e19
4 changed files with 224 additions and 3 deletions

View File

@@ -1,15 +1,17 @@
import { useEffect } from 'react';
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
import { BrowserRouter, Routes, Route, Navigate, useLocation } from 'react-router-dom';
import Login from './pages/Login';
import FamilyView from './pages/FamilyView';
import AdminPanel from './pages/AdminPanel';
import NoFamily from './pages/NoFamily';
import InvitePage from './pages/InvitePage';
import { useStore } from './store/useStore';
import { authApi } from './api/client';
import { Loader2 } from 'lucide-react';
function AppContent() {
const { user, isAuthenticated, isLoading, setUser, setIsLoading } = useStore();
const location = useLocation();
useEffect(() => {
checkAuth();
@@ -26,6 +28,14 @@ function AppContent() {
}
};
if (location.pathname.startsWith('/invite/')) {
return (
<Routes>
<Route path="/invite/:token" element={<InvitePage />} />
</Routes>
);
}
if (isLoading) {
return (
<div className="min-h-screen flex items-center justify-center gradient-bg">