privacy
All checks were successful
Deploy to Server / deploy (push) Successful in 33s

This commit is contained in:
2026-04-09 04:35:02 -05:00
parent 11730a8ad0
commit 2bd0a9e236
2 changed files with 148 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ import { SignUpForm } from './components/auth/SignUpForm';
import { EmailVerification } from './components/auth/EmailVerification';
import { ForgotPassword } from './components/auth/ForgotPassword';
import { ResetPassword } from './components/auth/ResetPassword';
import { PrivacyPolicy } from './components/PrivacyPolicy';
import { useSession, signOut } from './lib/auth-client';
import { LayoutDashboard, Package, FileCheck, LogOut, UserCircle } from 'lucide-react';
@@ -26,6 +27,10 @@ type AppView =
type Tab = 'dashboard' | 'inventory' | 'protocol' | 'profile';
function isPrivacyRoute() {
return window.location.pathname === '/privacy';
}
function isResetPasswordRoute() {
return (
window.location.pathname === '/reset-password' &&
@@ -35,6 +40,7 @@ function isResetPasswordRoute() {
export default function App() {
const { data: session, isPending } = useSession();
const [isPrivacy] = useState(isPrivacyRoute);
const [view, setView] = useState<AppView>(
isResetPasswordRoute() ? 'reset-password' : 'loading'
);
@@ -60,6 +66,8 @@ export default function App() {
});
}, [session, isPending, view]);
if (isPrivacy) return <PrivacyPolicy />;
if (view === 'reset-password') {
return (
<ResetPassword