From dcbce863de64bf05f48f1f3a79896dca897250d4 Mon Sep 17 00:00:00 2001 From: renolation Date: Sat, 2 May 2026 00:20:44 +0700 Subject: [PATCH] update --- src/components/layout/MobileNav.tsx | 38 +-- .../dashboard/components/Dashboard.tsx | 4 +- .../components/FlashCardLearnPage.tsx | 167 +++++++--- .../components/FlashCardListPage.tsx | 2 +- .../components/FlashCardTermsPage.tsx | 2 +- .../flash-card/components/Vocabulary.tsx | 2 +- src/features/home/components/Home.tsx | 2 +- src/features/settings/components/Settings.tsx | 4 +- .../toeic/components/ToeicPractice.tsx | 2 +- .../writing/components/WritingChecker.tsx | 2 +- .../writing/components/WritingHistory.tsx | 2 +- src/index.css | 1 + src/routes/__root.tsx | 6 +- src/styles/mobile.css | 295 ++++++++++++++++++ 14 files changed, 448 insertions(+), 81 deletions(-) create mode 100644 src/styles/mobile.css diff --git a/src/components/layout/MobileNav.tsx b/src/components/layout/MobileNav.tsx index 30cf5a5..b327a9c 100644 --- a/src/components/layout/MobileNav.tsx +++ b/src/components/layout/MobileNav.tsx @@ -1,12 +1,15 @@ import { Link, useRouterState } from '@tanstack/react-router' +import { Home, ClipboardList, Layers, Trophy, User } from 'lucide-react' import { cn } from '@/lib/utils' -const NAV_ITEMS = [ - { to: '/', label: 'Home', icon: 'home', matchPrefix: '/', exact: true }, - { to: '/archivement', label: 'Thành tích', icon: 'emoji_events', matchPrefix: '/archivement', exact: false }, - { to: '/toeic', label: 'Luyện đề', icon: 'assignment', matchPrefix: '/toeic', exact: false }, - { to: '/writing', label: 'Writing', icon: 'edit_note', matchPrefix: '/writing', exact: false }, - { to: '/settings', label: 'Cài đặt', icon: 'settings', matchPrefix: '/settings', exact: false }, +// Atelier Mobile tab bar — 5 tabs matching the mobile design. +// Labels keep the mobile design's playful brevity: Hôm nay / Luyện / Thẻ / Thành tích / Tôi +const TABS = [ + { to: '/', label: 'Hôm nay', icon: Home, matchPrefix: '/', exact: true }, + { to: '/toeic', label: 'Luyện', icon: ClipboardList, matchPrefix: '/toeic', exact: false }, + { to: '/flash-card', label: 'Thẻ', icon: Layers, matchPrefix: '/flash-card', exact: false }, + { to: '/archivement', label: 'Thành tích', icon: Trophy, matchPrefix: '/archivement', exact: false }, + { to: '/settings', label: 'Tôi', icon: User, matchPrefix: '/settings', exact: false }, ] function isActive(pathname: string, prefix: string, exact: boolean) { @@ -18,22 +21,19 @@ export function MobileNav() { const pathname = location.pathname return ( -