feat: setup dashboard
- Setup basic code structure - Add routes - Add layout components for authentication and dashboard pages - Add session handling - Add login, signup and session
This commit is contained in:
26
dashboard/src/routes/index.tsx
Normal file
26
dashboard/src/routes/index.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React from "react";
|
||||
import { Outlet, Route, Routes } from "react-router-dom";
|
||||
import { DashboardLayout } from "../layouts/DashboardLayout";
|
||||
import { Auth } from "../pages/Auth";
|
||||
|
||||
import { Home } from "../pages/Home";
|
||||
import { Users } from "../pages/Users";
|
||||
|
||||
export const AppRoutes = () => {
|
||||
return (
|
||||
<Routes>
|
||||
<Route path="login" element={<Auth />} />
|
||||
<Route path="setup" element={<Auth />} />
|
||||
<Route
|
||||
element={
|
||||
<DashboardLayout>
|
||||
<Outlet />
|
||||
</DashboardLayout>
|
||||
}
|
||||
>
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="users" element={<Users />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user