diff --git a/hotel-management/src/App.tsx b/hotel-management/src/App.tsx index e6edaa6..534dbb3 100644 --- a/hotel-management/src/App.tsx +++ b/hotel-management/src/App.tsx @@ -16,6 +16,7 @@ import Booking from './pages/Booking'; import Room from './pages/Room'; import NotFound from './pages/NotFound'; import Login from '@page/Login'; +import Account from '@page/Account'; // Constants import * as PATH from './constants/path'; @@ -93,6 +94,7 @@ function App() { } /> } /> } /> + } /> } /> } /> diff --git a/hotel-management/src/components/Sidebar/index.tsx b/hotel-management/src/components/Sidebar/index.tsx index b393109..7d97768 100644 --- a/hotel-management/src/components/Sidebar/index.tsx +++ b/hotel-management/src/components/Sidebar/index.tsx @@ -3,15 +3,18 @@ import Nav from '@component/Nav'; // Styled import { Heading, StyledSidebar } from './styled'; +import { useNavigate } from 'react-router-dom'; interface ISidebar { heading: string; } const Sidebar = ({ heading }: ISidebar) => { + const navigate = useNavigate(); + return ( - {heading} + navigate('/')}>{heading}