-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
33 lines (28 loc) · 855 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { useLocation } from "react-router-dom";
import './App.css';
import SideBar from './Components/SideBar';
import AllRoutes from './Pages/AllRoutes';
function App() {
const location = useLocation();
const currentRoute = location.pathname;
return (
<div className="App">
<h1 className='z-50 w-full fixed shadow-sm shadow-slate-700 top-0 text-2xl text-yellow-100 bg-indigo-300 font-bold p-4'>
{
currentRoute === "/" ? 'Contact Management App' :
currentRoute === "/dashboard" ? "Charts and Maps" :
'Contact Management App'
}
</h1>
<div className='flex w-full '>
<div className='sticky top-0 h-screen'>
<SideBar />
</div>
<div className='w-full'>
<AllRoutes />
</div>
</div>
</div>
);
}
export default App;