feat: add routes configuration in website settings for default login redirect
This commit is contained in:
parent
9046645006
commit
b16a1918de
@ -1,4 +1,5 @@
|
||||
import { PaymentTypes, PlanIntervals } from '@/payment/types';
|
||||
import { Routes } from '@/routes';
|
||||
import type { WebsiteConfig } from '@/types';
|
||||
|
||||
/**
|
||||
@ -29,6 +30,9 @@ export const websiteConfig: WebsiteConfig = {
|
||||
youtube: 'https://www.youtube.com/@MkSaaS',
|
||||
},
|
||||
},
|
||||
routes: {
|
||||
defaultLoginRedirect: Routes.Dashboard,
|
||||
},
|
||||
analytics: {
|
||||
enableVercelAnalytics: false,
|
||||
enableSpeedInsights: false,
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { websiteConfig } from './config/website';
|
||||
|
||||
/**
|
||||
* The routes for the application
|
||||
*/
|
||||
@ -79,4 +81,4 @@ export const protectedRoutes = [
|
||||
/**
|
||||
* The default redirect path after logging in
|
||||
*/
|
||||
export const DEFAULT_LOGIN_REDIRECT = Routes.Dashboard;
|
||||
export const DEFAULT_LOGIN_REDIRECT = websiteConfig.routes.defaultLoginRedirect;
|
||||
|
8
src/types/index.d.ts
vendored
8
src/types/index.d.ts
vendored
@ -5,6 +5,7 @@ import type { ReactNode } from 'react';
|
||||
*/
|
||||
export type WebsiteConfig = {
|
||||
metadata: MetadataConfig;
|
||||
routes: RoutesConfig;
|
||||
analytics: AnalyticsConfig;
|
||||
auth: AuthConfig;
|
||||
i18n: I18nConfig;
|
||||
@ -57,6 +58,13 @@ export interface SocialConfig {
|
||||
tiktok?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Routes configuration
|
||||
*/
|
||||
export interface RoutesConfig {
|
||||
defaultLoginRedirect?: string; // The default login redirect route
|
||||
}
|
||||
|
||||
/**
|
||||
* Analytics configuration
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user