Files
kanban/frontend/src/Root.tsx
T
egutierrez bee688e574 chore: auto-commit (28 archivos)
- app.md
- auth.go
- chat.go
- chat.log
- db.go
- frontend/package.json
- frontend/pnpm-lock.yaml
- frontend/src/App.tsx
- frontend/src/Root.tsx
- frontend/src/api.ts
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 00:27:18 +02:00

18 lines
405 B
TypeScript

import { Center, Loader } from "@mantine/core";
import { App } from "./App";
import { useAuth } from "./auth";
import { LoginPage } from "./components/LoginPage";
export function Root() {
const { user, loading } = useAuth();
if (loading) {
return (
<Center style={{ minHeight: "100vh" }}>
<Loader />
</Center>
);
}
if (!user) return <LoginPage />;
return <App />;
}