task/134-frontend-check #100
Reference in New Issue
Block a user
Delete Branch "task/134-frontend-check"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
task/134-frontend-check
nézd át van benne docsi is
BREAKING CHANGE: Replaced all direct useNavigate() usage with HandleNavigate hook ## Summary - Complete frontend navigation refactoring - Centralized route management with routes.js - Converted 18+ components to use HandleNavigate - Enhanced navigation with 20+ type-safe functions ## New Files - src/utils/routes.js - Central route constants and helpers - Documentations/FRONTEND_CODING_GUIDELINES.md - Frontend best practices (300+ lines) - Documentations/NAVIGATION_REFACTORING_REPORT.md - Detailed refactoring report (400+ lines) ## Modified Components (18+) ### Pages - Home.jsx, LoginForm.jsx, RegisterForm.jsx - ResetPassword.jsx, VerifyEmailPage.jsx - DeckCreator.jsx, Card_display.jsx - Lobby.jsx, GameTest.jsx, ChooseDeck.jsx, PlayerSetup.jsx - Landingpage.jsx ### Components - Userdetails.jsx, DeckInfoPopUp.jsx - PlayMenu.jsx, LandingPage.jsx, DeckManager.jsx ### Hooks - useRequireAuth.jsx ### Core - App.jsx - Route constants integration - HandleNavigate.jsx - Enhanced with 20+ navigation functions ## Key Improvements Type-safe navigation (goDeckDetails(id) vs navigate('/deck/'+id)) Automatic scroll management Centralized state passing Single source of truth for routes Backwards compatibility aliases Zero compile errors Production ready ## Validation - useNavigate: Only in HandleNavigate.jsx - navigate() calls: 0 direct usage - Compile errors: 0 - Documentation: Complete