feat: add sign-in flow, routing shell, and searchable book list

Pin @testing-library/jest-dom to ~6.9.1 (6.10.0 is npm-deprecated).

Claude-Session: https://claude.ai/code/session_01M9MLit5Ko3X4s7rzC5Kv7X
This commit is contained in:
2026-10-02 14:23:42 -05:00
parent e1096da1a7
commit f0efa25f23
14 changed files with 625 additions and 11 deletions
+10
View File
@@ -0,0 +1,10 @@
import { Navigate, Outlet, useLocation } from 'react-router'
import { useAuth } from './AuthContext'
export function RequireAuth() {
const { user, loading } = useAuth()
const location = useLocation()
if (loading) return <p className="p-6 text-slate-500">Loading…</p>
if (!user) return <Navigate to="/login" replace state={{ from: location }} />
return <Outlet />
}