Skip to content

Commit

Permalink
fix(projects): Fix the logic of root route redirection to home
Browse files Browse the repository at this point in the history
  • Loading branch information
Azir-11 committed Mar 1, 2024
1 parent 418302a commit 0123c37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/router/routes/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { CustomRoute, ElegantConstRoute, ElegantRoute } from '@elegant-router/types';
import { generatedRoutes } from '../elegant/routes';
import { layouts, views } from '../elegant/imports';
import { transformElegantRoutesToVueRoutes } from '../elegant/transform';
import { getRoutePath, transformElegantRoutesToVueRoutes } from '../elegant/transform';

export const ROOT_ROUTE: CustomRoute = {
name: 'root',
path: '/',
redirect: '/home',
redirect: getRoutePath(import.meta.env.VITE_ROUTE_HOME) || '/home',
meta: {
title: 'root',
constant: true
Expand Down

0 comments on commit 0123c37

Please sign in to comment.