Files
HaBit/lib/routes.ts
Harkamal Randhawa 2d12b663c9 Move Style entry to pet portrait and drop it from bottom nav.
Add a palette shortcut on the habitat LCD and keep customize at /customize.
2026-05-24 04:38:22 -06:00

39 lines
1.1 KiB
TypeScript

export const routes = {
home: "/",
login: "/auth/login",
signUp: "/auth/sign-up",
signUpSuccess: "/auth/sign-up-success",
onboardingQuiz: "/onboarding/quiz",
onboardingCustomize: "/onboarding/customize",
avatar: "/avatar",
customize: "/customize",
habits: "/habits",
dailyQuiz: "/daily/quiz",
shop: "/shop",
profile: "/profile",
} as const;
export type AppRoute = (typeof routes)[keyof typeof routes];
export const appNavItems = [
{ href: routes.avatar, label: "Pet", shortLabel: "Pet" },
{ href: routes.habits, label: "Habits", shortLabel: "Habits" },
{ href: routes.dailyQuiz, label: "Daily Quiz", shortLabel: "Quiz" },
{ href: routes.shop, label: "Shop", shortLabel: "Shop" },
{ href: routes.profile, label: "Profile", shortLabel: "Profile" },
] as const;
export type NavItem = (typeof appNavItems)[number];
export function isAuthPath(pathname: string) {
return pathname.startsWith("/auth");
}
export function isOnboardingPath(pathname: string) {
return pathname.startsWith("/onboarding");
}
export function isPublicPath(pathname: string) {
return pathname === routes.home || isAuthPath(pathname);
}