Files
HaBit/lib/routes.ts
Harkamal Randhawa 93af01dec1 Rename daily quiz to check-in and add collapsible journal calendar.
Replace user-facing quiz wording with daily check-in, add journal history on the Bit page with month browsing and read-only entry modals, and keep legacy quiz routes redirecting to the new anchor.
2026-05-24 10:20:03 -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",
dailyCheckIn: "/daily/check-in",
dailyQuiz: "/daily/quiz",
shop: "/shop",
profile: "/profile",
} as const;
export type AppRoute = (typeof routes)[keyof typeof routes];
export const appNavItems = [
{ href: routes.avatar, label: "Bit", shortLabel: "Bit" },
{ href: routes.customize, label: "Customize", shortLabel: "Style" },
{ 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);
}