diff --git a/src/providers/auth.provider.tsx b/src/providers/auth.provider.tsx index 7eb1dbb4..9bfbfa51 100644 --- a/src/providers/auth.provider.tsx +++ b/src/providers/auth.provider.tsx @@ -22,7 +22,13 @@ import type { User, AuthProvider as FirebaseAuthProvider } from "firebase/auth"; import type { NotificationOptions } from "@/providers/types"; import type { ApplicationData } from "@/components/forms/types"; -type UserType = "hacker" | "mentor" | "volunteer" | "speaker" | "sponsor"; +type UserType = + | "hacker" + | "mentor" + | "volunteer" + | "speaker" + | "sponsor" + | "guest"; export interface UserWithClaims extends User { hawkAdmin: boolean; diff --git a/src/providers/routes.provider.tsx b/src/providers/routes.provider.tsx index 57969c22..334aa76d 100644 --- a/src/providers/routes.provider.tsx +++ b/src/providers/routes.provider.tsx @@ -329,6 +329,12 @@ export const RoutesProvider: FC = ({ children }) => { ]; } + if (currentUser.type === "guest") { + userRoutes.children = [ + { index: true, path: paths.myTicket, element: }, + ]; + } + // only default routes setUserRoutes(userRoutes.children); setRoutes(availableRoutes);