mirror of
https://github.com/its-michaelroy/Deep-Impact.git
synced 2026-06-04 02:20:41 +00:00
38 lines
769 B
JavaScript
38 lines
769 B
JavaScript
// router.jsx
|
|
import { createBrowserRouter } from "react-router-dom";
|
|
import App from "./App";
|
|
import Main from "./pages/main";
|
|
import Scenario from "./pages/scenario";
|
|
import About from "./pages/about";
|
|
import Effects from "./pages/effects";
|
|
import Defenses from "./pages/defenses";
|
|
const router = createBrowserRouter([
|
|
{
|
|
path: "/",
|
|
element: <App />,
|
|
children: [
|
|
{
|
|
index: true,
|
|
element: <Main />,
|
|
},
|
|
{
|
|
path: 'scenario/',
|
|
element: <Scenario />
|
|
},
|
|
{
|
|
path: 'about/',
|
|
element: <About />
|
|
},
|
|
{
|
|
path: 'effects/',
|
|
element: <Effects />
|
|
},
|
|
{
|
|
path: 'defenses/',
|
|
element: <Defenses />
|
|
}
|
|
],
|
|
},
|
|
]);
|
|
|
|
export default router; |