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 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>
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
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