diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 4cd8e405c1f5e28edee19bbf47fa0768eec30c30..a98b4be7e9677597d0de7b83447cec524e8e2bb2 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,7 +1,7 @@ import { createBrowserRouter, RouterProvider } from 'react-router-dom'; import { useState, useEffect } from 'react'; import { BucketInfo } from './models/bucket'; -import { routes } from './routes'; +import { staticRouts } from './routes'; import APIService from './services/APIService'; import { BucketsListContext } from './services/BucketListContext'; @@ -22,7 +22,7 @@ function App() { }, [isAuthenticated]); - const router = createBrowserRouter(routes.map(route => { + const router = createBrowserRouter(staticRouts.map(route => { return { path: route.path, element: route.element diff --git a/frontend/src/components/Drawer.tsx b/frontend/src/components/Drawer.tsx index 8e9a44f78cc8a64ecbb4fb45555f89a6a8b33323..73d9395fe95aa9056d0e42c9251eba67210be726 100644 --- a/frontend/src/components/Drawer.tsx +++ b/frontend/src/components/Drawer.tsx @@ -1,9 +1,9 @@ -import { routes } from '../routes'; +import { staticRouts } from '../routes'; import { Link } from 'react-router-dom'; export const Drawer = () => { const path = window.location.pathname; - const links = routes.map(route => { + const links = staticRouts.map(route => { let className = "h-10 hover:bg-neutral-300 rounded-lg p-2"; className += route.path === path ? " bg-neutral-200" : ""; return ( diff --git a/frontend/src/routes/index.tsx b/frontend/src/routes/index.tsx index 97eafc6abc7fe6a61c80109063fe55bf87bc8788..db3e4852900fe25502b093efa7a7447497741934 100644 --- a/frontend/src/routes/index.tsx +++ b/frontend/src/routes/index.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import { Home } from './Home'; import { Buckets } from './Buckets'; @@ -8,7 +8,7 @@ export type Route = { element: ReactNode } -export const routes: Route[] = [ +export const staticRouts: Route[] = [ { title: "Home", path: "/", element: <Home /> }, { title: "Buckets", path: "/buckets", element: <Buckets /> } ];