fix: update default login redirect to use fallback route if not defined

This commit is contained in:
javayhu 2025-04-24 23:34:17 +08:00
parent b16a1918de
commit 222154397a
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,4 @@
import { PaymentTypes, PlanIntervals } from '@/payment/types';
import { Routes } from '@/routes';
import type { WebsiteConfig } from '@/types';
/**
@ -31,7 +30,7 @@ export const websiteConfig: WebsiteConfig = {
},
},
routes: {
defaultLoginRedirect: Routes.Dashboard,
defaultLoginRedirect: '/dashboard',
},
analytics: {
enableVercelAnalytics: false,

View File

@ -81,4 +81,5 @@ export const protectedRoutes = [
/**
* The default redirect path after logging in
*/
export const DEFAULT_LOGIN_REDIRECT = websiteConfig.routes.defaultLoginRedirect;
export const DEFAULT_LOGIN_REDIRECT =
websiteConfig.routes.defaultLoginRedirect ?? Routes.Dashboard;