Skip to content

Commit 84da36a

Browse files
committed
feat: 添加首页路由用于转发页面
1 parent beed69e commit 84da36a

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/pages/config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1+
import { redirect } from 'react-router-dom';
2+
13
export const config = {
4+
constant: true,
25
i18nKey: 'route.root',
36
title: 'root'
47
};
8+
9+
export const loader = () => {
10+
return redirect(import.meta.env.VITE_ROUTE_HOME);
11+
};

src/pages/index.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { Navigate } from 'react-router-dom';
2+
3+
const Index = () => {
4+
return <Navigate to="/manage/menu" />;
5+
};
6+
7+
export default Index;

0 commit comments

Comments
 (0)