From 51f459c230ce93eba7c468baacf0646e7bf6449b Mon Sep 17 00:00:00 2001 From: houseassassin Date: Wed, 20 May 2026 12:19:14 +0300 Subject: [PATCH] feat: Navbar, Sidebar, Footer layout components --- src/components/layout/Footer.tsx | 22 ++++++++++++++++ src/components/layout/Navbar.tsx | 44 +++++++++++++++++++++++++++++++ src/components/layout/Sidebar.tsx | 32 ++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 src/components/layout/Footer.tsx create mode 100644 src/components/layout/Navbar.tsx create mode 100644 src/components/layout/Sidebar.tsx diff --git a/src/components/layout/Footer.tsx b/src/components/layout/Footer.tsx new file mode 100644 index 0000000..d83b0df --- /dev/null +++ b/src/components/layout/Footer.tsx @@ -0,0 +1,22 @@ +import { Shield } from "lucide-react"; + +export function Footer() { + return ( + + ); +} diff --git a/src/components/layout/Navbar.tsx b/src/components/layout/Navbar.tsx new file mode 100644 index 0000000..c0604ed --- /dev/null +++ b/src/components/layout/Navbar.tsx @@ -0,0 +1,44 @@ +import { Link, useNavigate } from "react-router-dom"; +import { Shield, LogOut, LayoutDashboard } from "lucide-react"; +import { useAuthStore } from "../../store/auth"; +import { Button } from "../ui/Button"; + +export function Navbar() { + const { isLoggedIn, logout } = useAuthStore(); + const navigate = useNavigate(); + const loggedIn = isLoggedIn(); + + return ( + + ); +} diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx new file mode 100644 index 0000000..d32a9c3 --- /dev/null +++ b/src/components/layout/Sidebar.tsx @@ -0,0 +1,32 @@ +import { NavLink } from "react-router-dom"; +import { LayoutDashboard, Key, Smartphone, CreditCard, Globe, User } from "lucide-react"; + +const links = [ + { to: "/dashboard", icon: LayoutDashboard, label: "Обзор" }, + { to: "/dashboard/keys", icon: Key, label: "Мои ключи" }, + { to: "/dashboard/devices", icon: Smartphone, label: "Устройства" }, + { to: "/dashboard/payments", icon: CreditCard, label: "Платежи" }, + { to: "/dashboard/servers", icon: Globe, label: "Серверы" }, + { to: "/profile", icon: User, label: "Профиль" }, +]; + +export function Sidebar() { + return ( + + ); +}