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>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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 />;
|
||||
}
|
||||
Reference in New Issue
Block a user