Skip to content

Commit

Permalink
passar testes
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaloney111 authored Mar 21, 2024
1 parent 3c54f48 commit dc8ae40
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import { Navigate, useRoutes } from "react-router-dom";
import { Route, Navigate } from "react-router-dom";
import { Home, Train } from "./elements";

export default function Router() {
return useRoutes([
{
path: "/",
element: <Home />,
},
{
path: "/train",
element: <Train />,
},
{ path: "*", element: <Navigate to="/404" replace /> },
{ path: "/404", element: <>404</> },
]);
return (
<>
<Route path="/" element={<Home />} />
<Route path="/train" element={<Train />} />
<Route path="/404" element={<Navigate to="/404" replace />} />
<Route path="*" element={<Navigate to="/404" replace />} />
</>
);
}

0 comments on commit dc8ae40

Please sign in to comment.