Skip to content

Commit

Permalink
Remove adminpanel prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
joonatanaatos committed Jan 3, 2024
1 parent 823fc4e commit 2dd8a52
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 32 deletions.
1 change: 0 additions & 1 deletion admin-panel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "admin-panel",
"version": "0.1.0",
"private": true,
"homepage": "/adminpanel",
"dependencies": {
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^13.0.0",
Expand Down
57 changes: 26 additions & 31 deletions admin-panel/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,34 @@ const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement,
);

const router = createBrowserRouter(
[
{
path: '/',
element: <App />,
children: [
{
path: '/',
element: <Navigate to="callers" />,
},
{
path: '/callers',
element: <CallerView />,
},
{
path: '/events',
element: <EventView />,
},
{
path: '/audio',
element: <AudioView />,
},
],
},
{
path: '*',
element: <Navigate to="/callers" />,
},
],
const router = createBrowserRouter([
{
basename: '/adminpanel',
path: '/',
element: <App />,
children: [
{
path: '/',
element: <Navigate to="callers" />,
},
{
path: '/callers',
element: <CallerView />,
},
{
path: '/events',
element: <EventView />,
},
{
path: '/audio',
element: <AudioView />,
},
],
},
);
{
path: '*',
element: <Navigate to="/callers" />,
},
]);

root.render(
<React.StrictMode>
Expand Down

0 comments on commit 2dd8a52

Please sign in to comment.