Added: Dashboard layout

This commit is contained in:
Llewellyn D'souza
2022-01-06 16:06:02 +05:30
parent c704b27805
commit 471749c81d
3 changed files with 20 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ import { Routes, Route, useLocation, Navigate } from 'react-router-dom';
import Test from './components/Test';
import AuthProvider, { useAuth } from './config/authProvider';
import localizationInit from './config/localization';
import Dashboard from './layouts/dashboard';
localizationInit();
@@ -25,7 +26,7 @@ function App() {
return (
<AuthProvider>
<Routes>
<Route path="/" element={<>Hey there</>} />
<Route path="/" element={<Dashboard />} />
<Route path="/login" element={<Test />} />
<Route path="/dashboard" element={<RequireAuth>This is secret</RequireAuth>} />
</Routes>

View File

@@ -1,10 +1,13 @@
body {
margin: 0;
font-family: Averta;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
* {
font-family: Averta;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
}
@@ -14,4 +17,4 @@ code {
src: local('Averta'), url(./assets/fonts/Averta.woff) format('woff');
/* other formats include: 'woff2', 'truetype, 'opentype',
'embedded-opentype', and 'svg' */
}
}

View File

@@ -0,0 +1,13 @@
export default function Dashboard({ children }) {
return (
<div className={styles.dashboardGrid}>
<div className={styles.mainContent}>
<div className={styles.topBar}>search comes here</div>
<div className={styles.breadcrumbs}>
breadcrumbs {'>'} are {'>'} here
</div>
<div className={styles.content}>rest content comes here</div>
</div>
</div>
);
}