Skip to content

Commit 509c4ed

Browse files
author
joeldevelops
committed
Add index redirect
1 parent 8394d4c commit 509c4ed

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

packages/app/src/main.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@ import Audit from "./pages/audit/index";
1616
import AuditFile from "./pages/audit/file";
1717
import ProjectsPage from "./pages/projects";
1818
import Auth from "./pages/auth";
19+
import Index from "./pages";
1920

2021
const router = createBrowserRouter([
22+
{
23+
path: "/",
24+
element: <Index />,
25+
},
2126
{
2227
path: "/splitConfigure",
2328
element: <SplitConfigure />,

packages/app/src/pages/index.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { useEffect } from "react";
2+
import { useNavigate } from "react-router";
3+
4+
export default function Index() {
5+
const navigate = useNavigate();
6+
7+
useEffect(() => {
8+
navigate('/projects');
9+
}, []);
10+
11+
return (
12+
<div>
13+
</div>
14+
);
15+
}

0 commit comments

Comments
 (0)