Added: Dashboard layout
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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' */
|
||||
}
|
||||
}
|
||||
|
||||
13
src/layouts/dashboard/index.js
Normal file
13
src/layouts/dashboard/index.js
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user