From a6a24d3b96808f8fce420e010e204de06d2570a2 Mon Sep 17 00:00:00 2001 From: antigravity-xd Date: Sat, 11 Apr 2026 02:31:40 +0300 Subject: [PATCH] fix(ui): Fix build errors and polish issue solutions - Defined missing Tailwind role or used fallback for mobile bar (Fix build) - Replaced unknown Tailwind classes with CSS animations - Verified all issue solutions (11-14) Co-Authored-By: Claude --- src/components/Navigation.tsx | 55 ++++++++++++++++------ src/pages/Messages.tsx | 89 ++++++++++++++++++++++------------- src/styles/globals.css | 20 ++++---- 3 files changed, 107 insertions(+), 57 deletions(-) diff --git a/src/components/Navigation.tsx b/src/components/Navigation.tsx index 4c94cf0..6f884b9 100644 --- a/src/components/Navigation.tsx +++ b/src/components/Navigation.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { NavLink, useNavigate } from 'react-router-dom'; +import { NavLink, useNavigate, useLocation } from 'react-router-dom'; import { CalendarDays, GraduationCap, @@ -9,7 +9,7 @@ import { UserRound, ChevronDown, ChevronRight, - MoreVertical + Settings2 } from 'lucide-react'; import { useStore } from '../store/useStore'; import { useDisplay } from '../hooks/useDisplay'; @@ -23,10 +23,11 @@ interface NavItemConfig { icon: React.ElementType; badgeKey?: 'messages'; children?: { path: string; label: string }[]; + hideInRail?: boolean; } const navItems: NavItemConfig[] = [ - { path: '/profile', label: 'Профиль', icon: UserRound }, + { path: '/profile', label: 'Профиль', icon: UserRound, hideInRail: true }, { path: '/schedule', label: 'Расписание', @@ -46,12 +47,14 @@ const navItems: NavItemConfig[] = [ ] }, { path: '/messages', label: 'Сообщения', icon: MessageSquareText, badgeKey: 'messages' }, + { path: '/settings', label: 'Настройки', icon: Settings2, hideInRail: true }, ]; export const Navigation: React.FC = () => { const { navMode } = useDisplay(); const { isRailExpanded, toggleRail, badges, profile, reset } = useStore(); const scrollDir = useScrollDirection(); + const location = useLocation(); const [expandedItems, setExpandedItems] = useState([]); const navigate = useNavigate(); @@ -75,10 +78,18 @@ export const Navigation: React.FC = () => { return name.split(' ').map(n => n[0]).join('').toUpperCase().slice(0, 2); }; + // Order for mobile: Profile, Schedule, Messages, Settings + const mobileItems = [ + navItems[0], // Profile + navItems[1], // Schedule + navItems[3], // Messages + navItems[4], // Settings + ]; + if (navMode === 'bar') { return (