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

View File

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