Skip to content

Commit

Permalink
correction main2
Browse files Browse the repository at this point in the history
  • Loading branch information
jean519 committed Dec 14, 2023
1 parent 291be71 commit 18756ce
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
19 changes: 10 additions & 9 deletions frontend/src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,26 @@ import { createBrowserRouter, RouterProvider } from "react-router-dom";
import App from "./App";
import Home from "./pages/Home";
import AdminPage from "./pages/AdminPage";
import AdminGame from "./pages/AdminGame";

const router = createBrowserRouter([
{
path: "/",
element: <App />,
children: [
{
path: "/",
path: "",
element: <Home />,
},
],
},
{
path: "admin/",
element: <AdminPage />,
children: [
{
path: "/admin",
element: <AdminPage />,
children: [
{
path: "/admin/game",
element: <AdminPage />,
},
],
path: "game",
element: <AdminGame />,
},
],
},
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/pages/AdminPage.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { Outlet } from "react-router-dom";

function AdminPage() {
return <div>AdminPage</div>;
return (
<div>
<Outlet />
</div>
);
}

export default AdminPage;

0 comments on commit 18756ce

Please sign in to comment.