feat: Модуль Финансы + Трекер + CI/CD #1

Merged
daniil merged 15 commits from dev into main 2026-03-01 05:14:59 +00:00
Showing only changes of commit c898c0063c - Show all commits

View File

@@ -1,15 +1,21 @@
import { NavLink } from "react-router-dom" import { NavLink } from "react-router-dom"
import { Home, BarChart3, Wallet, PiggyBank, Settings } from "lucide-react" import { Home, BarChart3, Wallet, PiggyBank, Settings } from "lucide-react"
import { useAuthStore } from "../store/auth"
import clsx from "clsx" import clsx from "clsx"
const OWNER_ID = 1
export default function Navigation() { export default function Navigation() {
const user = useAuthStore((s) => s.user)
const isOwner = user?.id === OWNER_ID
const navItems = [ const navItems = [
{ to: "/", icon: Home, label: "Главная" }, { to: "/", icon: Home, label: "Главная" },
{ to: "/tracker", icon: BarChart3, label: "Трекер" }, { to: "/tracker", icon: BarChart3, label: "Трекер" },
{ to: "/finance", icon: Wallet, label: "Финансы" }, isOwner && { to: "/finance", icon: Wallet, label: "Финансы" },
{ to: "/savings", icon: PiggyBank, label: "Накопления" }, { to: "/savings", icon: PiggyBank, label: "Накопления" },
{ to: "/settings", icon: Settings, label: "Настройки" }, { to: "/settings", icon: Settings, label: "Настройки" },
] ].filter(Boolean)
return ( return (
<nav className="fixed bottom-0 left-0 right-0 bg-white/80 dark:bg-gray-900/80 backdrop-blur-xl border-t border-gray-100 dark:border-gray-800 z-50 transition-colors duration-300"> <nav className="fixed bottom-0 left-0 right-0 bg-white/80 dark:bg-gray-900/80 backdrop-blur-xl border-t border-gray-100 dark:border-gray-800 z-50 transition-colors duration-300">