diff --git a/src/App.tsx b/src/App.tsx index 38ec896..c1cd582 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -19,23 +19,6 @@ import { PendingValidationView } from './components/PendingValidationView'; export default function App() { const [session, setSession] = useState(() => getStoredSession()); - useEffect(() => { - console.log('[App] session changed:', session ? 'logged in' : 'logged out'); - }, [session]); - - const handleSignOut = () => { - signOut(); - setSession(null); - }; - - if (!session) { - return { - const stored = getStoredSession(); - console.log('[App] onLogin, stored session:', stored ? 'found' : 'null'); - setSession(stored); - }} />; - } - const [appState, setAppState] = useState({ headers: [], data: [], @@ -53,6 +36,23 @@ export default function App() { const [pendingRows, setPendingRows] = useState>({}); const [isSavingAll, setIsSavingAll] = useState(false); + useEffect(() => { + console.log('[App] session changed:', session ? 'logged in' : 'logged out'); + }, [session]); + + const handleSignOut = () => { + signOut(); + setSession(null); + }; + + if (!session) { + return { + const stored = getStoredSession(); + console.log('[App] onLogin, stored session:', stored ? 'found' : 'null'); + setSession(stored); + }} />; + } + useEffect(() => { const loadDefaultData = async () => { // In dev: Vite proxy handles /dropbox-file (see vite.config.ts)