Skip to content

Commit

Permalink
Add /home and * routes (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgading authored Feb 23, 2024
1 parent dd93fc7 commit 813a836
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { createRoot } from "react-dom/client";
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import { Navigate, createBrowserRouter, RouterProvider } from 'react-router-dom';
import { QueryClientProvider } from '@tanstack/react-query';
import { queryClient } from './config/queryClient';
import '@civicactions/data-catalog-components/dist/index.css';
Expand All @@ -20,6 +20,10 @@ const router = createBrowserRouter([
path: "/",
element: <Home />
},
{
path: "/home",
element: <Navigate replace to="/" />
},
{
path: "/about",
element: <About />
Expand All @@ -44,6 +48,10 @@ const router = createBrowserRouter([
path: "/dataset/:id/api",
element: <ApiDocsSpecific />
},
{
path: '*',
element: <NotFound />,
},
]);

createRoot(document.getElementById("root")).render(
Expand Down

0 comments on commit 813a836

Please sign in to comment.