diff --git a/client/package-lock.json b/client/package-lock.json
index f90fa3e..62b5ea9 100644
--- a/client/package-lock.json
+++ b/client/package-lock.json
@@ -677,9 +677,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -697,9 +694,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -717,9 +711,6 @@
"ppc64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -737,9 +728,6 @@
"s390x"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -757,9 +745,6 @@
"x64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -777,9 +762,6 @@
"x64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -1006,9 +988,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -1030,9 +1009,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -1054,9 +1030,6 @@
"x64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -1078,9 +1051,6 @@
"x64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -1253,9 +1223,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -1273,9 +1240,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -1293,9 +1257,6 @@
"x64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -1313,9 +1274,6 @@
"x64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -2658,9 +2616,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -2682,9 +2637,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -2706,9 +2658,6 @@
"x64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -2730,9 +2679,6 @@
"x64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
diff --git a/client/src/App.jsx b/client/src/App.jsx
index 1606055..f7ad6e7 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -1,7 +1,11 @@
+
import React from "react";
import { BrowserRouter, Routes, Route, Navigate } from "react-router";
+
import { AuthProvider, useAuth } from "./context/AuthContext.jsx";
+import { ThemeProvider } from "./context/ThemeContext.jsx";
import { ToastProvider } from "./components/Shared/Toast.jsx";
+
import ProtectedRoute from "./components/Layout/ProtectedRoute.jsx";
import Sidebar from "./components/Layout/Sidebar.jsx";
import Topbar from "./components/Layout/Topbar.jsx";
@@ -16,22 +20,32 @@ import NotFound from "./pages/NotFound.jsx";
const AuthRoute = ({ children }) => {
const { user, loading } = useAuth();
- if (loading) return ;
- if (user) return ;
+
+ if (loading) {
+ return ;
+ }
+
+ if (user) {
+ return ;
+ }
+
return children;
};
const DashLayout = ({ children }) => (
+ {/* Mobile Topbar */}
+ {/* Desktop Sidebar */}
+ {/* Main Content */}
{children}
@@ -41,42 +55,77 @@ const DashLayout = ({ children }) => (
const App = () => (
-
-
-
- } />
- } />
-
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
- } />
- } />
-
-
-
+
+
+
+
+ {/* Authentication Routes */}
+
+
+
+ }
+ />
+
+
+
+
+ }
+ />
+
+ {/* Dashboard */}
+
+
+
+
+
+ }
+ />
+
+ {/* Tasks */}
+
+
+
+
+
+ }
+ />
+
+ {/* Profile */}
+
+
+
+
+
+ }
+ />
+
+ {/* Default Route */}
+ }
+ />
+
+ {/* 404 Not Found */}
+ } />
+
+
+
+
);
diff --git a/client/src/components/Layout/Sidebar.jsx b/client/src/components/Layout/Sidebar.jsx
index 74db41e..2889cc8 100644
--- a/client/src/components/Layout/Sidebar.jsx
+++ b/client/src/components/Layout/Sidebar.jsx
@@ -1,6 +1,8 @@
+
import React, { useState } from "react";
import { NavLink, useNavigate } from "react-router";
import { useAuth } from "../../context/AuthContext.jsx";
+import { useTheme } from "../../context/ThemeContext.jsx";
import Logo from "../Shared/Logo.jsx";
import Tooltip from "../Shared/Tooltip.jsx";
@@ -8,7 +10,16 @@ const navItems = [
{
to: "/dashboard",
icon: (
-