From 49f335e83ae12ffdbb94065c086251178432fc08 Mon Sep 17 00:00:00 2001 From: Lanskikh Date: Wed, 11 Jun 2025 12:45:00 +0500 Subject: [PATCH] upd --- src/components/Button.tsx | 2 +- src/components/Navbar.tsx | 167 ++++++++++++++++++------------------- src/pages/ClientsPage.tsx | 5 ++ src/pages/ManagersPage.tsx | 5 ++ src/pages/ProjectsPage.tsx | 5 ++ src/routes.tsx | 15 ++++ 6 files changed, 112 insertions(+), 87 deletions(-) create mode 100644 src/pages/ClientsPage.tsx create mode 100644 src/pages/ManagersPage.tsx create mode 100644 src/pages/ProjectsPage.tsx diff --git a/src/components/Button.tsx b/src/components/Button.tsx index f011972..8bdf077 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -23,7 +23,7 @@ function Button({ ref={ref} {...props} onClick={(e) => { - if (type !== "submit") e.preventDefault(); + if (type !== "submit" && variant !== "menu") e.preventDefault(); onClick?.(e); }} className={clsx( diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index ba0135e..d2800f8 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,4 +1,4 @@ -import { Link, useLocation } from "react-router"; +import { NavLink } from "react-router"; import HomeIcon from "./icons/HomeIcon"; import DesktopIcon from "./icons/DesktopIcon"; import Button from "./Button"; @@ -8,93 +8,88 @@ import ClientIcon from "./icons/ClientIcon"; import AppsIcon from "./icons/AppsIcon"; function Navbar() { - const { pathname } = useLocation(); - return (
- - - - - - - - - - - - - - - + + {({ isActive }) => ( + + )} + + + {({ isActive }) => ( + + )} + + + {({ isActive }) => ( + + )} + + + {({ isActive }) => ( + + )} + + + {({ isActive }) => ( + + )} +
); } diff --git a/src/pages/ClientsPage.tsx b/src/pages/ClientsPage.tsx new file mode 100644 index 0000000..871b985 --- /dev/null +++ b/src/pages/ClientsPage.tsx @@ -0,0 +1,5 @@ +function ClientsPage() { + return
; +} + +export default ClientsPage; diff --git a/src/pages/ManagersPage.tsx b/src/pages/ManagersPage.tsx new file mode 100644 index 0000000..aa7172e --- /dev/null +++ b/src/pages/ManagersPage.tsx @@ -0,0 +1,5 @@ +function ManagersPage() { + return
; +} + +export default ManagersPage; diff --git a/src/pages/ProjectsPage.tsx b/src/pages/ProjectsPage.tsx new file mode 100644 index 0000000..1d98e2f --- /dev/null +++ b/src/pages/ProjectsPage.tsx @@ -0,0 +1,5 @@ +function ProjectsPage() { + return
; +} + +export default ProjectsPage; diff --git a/src/routes.tsx b/src/routes.tsx index 6190e59..fa0be65 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -1,6 +1,9 @@ import Layout from "./components/Layout"; +import ClientsPage from "./pages/ClientsPage"; import DashboardPage from "./pages/DashboardPage"; import LoginPage from "./pages/LoginPage"; +import ManagersPage from "./pages/ManagersPage"; +import ProjectsPage from "./pages/ProjectsPage"; import ProtectedPage from "./pages/ProtectedPage"; import SessionsPage from "./pages/SessionsPage"; @@ -20,6 +23,18 @@ export default [ path: "sessions", element: , }, + { + path: "managers", + element: , + }, + { + path: "clients", + element: , + }, + { + path: "projects", + element: , + }, ], }, ],