Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useEffect, useState } from "react";
import LandingPage from "./components/LandingPage";
import LoginPage from "./features/auth/LoginPage";
import SignupPage from "./features/auth/SignupPage";
import VerifyEmailPage from "./features/auth/VerifyEmailPage";
import OrgAuthPage from "./features/org/OrgAuthPage";
import ProfileSetupPage from "./features/user/ProfileSetupPage";
import DashboardPage from "./features/user/DashboardPage";
Expand All @@ -22,6 +23,7 @@ type Page =
| "login"
| "signup"
| "org-auth"
| "verify-email"
| "profile-setup"
| "dashboard"
| "org-dashboard"
Expand Down Expand Up @@ -92,7 +94,7 @@ function App() {

const handleSignupSuccess = (data: TokenResponse) => {
setAuth({ token: data.token, user: data.user, isNewUser: true });
setPage("profile-setup");
setPage("verify-email");
};

const handleProfileComplete = (updatedUser: UserResponse) => {
Expand Down Expand Up @@ -150,6 +152,17 @@ function App() {
/>
);

case "verify-email":
if (!auth) return null;
return (
<VerifyEmailPage
email={auth.user.email}
onBackToSignup={() => setPage("signup")}
onContinue={() => setPage("profile-setup")}
onLoginClick={() => setPage("login")}
/>
);

case "profile-setup":
if (!auth) return null;
return (
Expand Down
Loading
Loading