Home route

This commit is contained in:
Manav Rathi 2024-05-26 15:55:41 +05:30
parent 6d289d73db
commit b2fda16561
No known key found for this signature in database

View file

@ -1,11 +1,23 @@
import { ACCOUNTS_PAGES, AUTH_PAGES, PHOTOS_PAGES } from "../constants/pages";
/**
* Arbitrary names that we used as keys for indexing various constants for each
* of our apps.
* Arbitrary names that we used as keys for indexing various constants
* corresponding to our apps.
*/
export type AppName = "account" | "albums" | "auth" | "photos";
/**
* The "home" route for each of our apps.
*
* This is where we redirect to, e.g, after successful authentication.
*/
export const appHomeRoute: Record<AppName, string> = {
account: ACCOUNTS_PAGES.PASSKEYS,
albums: "/",
auth: AUTH_PAGES.AUTH,
photos: PHOTOS_PAGES.GALLERY,
};
export enum APPS {
PHOTOS = "PHOTOS",
AUTH = "AUTH",