task/134-frontend-check #100

Merged
Donat merged 6 commits from task/134-frontend-check into main 2025-11-17 19:40:56 +01:00

6 Commits

Author SHA1 Message Date
magdo 70cc18a58d Merge branch 'main' of https://git.mdnd-it.cc/Donat/SerpentRace 2025-11-17 19:39:00 +01:00
GitG0r0 6d25a499b2 feat: Centralized navigation system with HandleNavigate hook
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
2025-11-17 09:07:05 +01:00
GitG0r0 51e79b00d4 Merge branch 'main' of https://git.mdnd-it.cc/Donat/SerpentRace into task/134-frontend-check 2025-11-17 08:28:27 +01:00
GitG0r0 1c67af90dc Merge branch 'main' of https://git.mdnd-it.cc/Donat/SerpentRace into task/134-frontend-check 2025-11-10 19:21:57 +01:00
GitG0r0 5479ca7f16 Merge branch 'main' of https://git.mdnd-it.cc/Donat/SerpentRace into cdjavitasok 2025-11-09 16:43:45 +01:00
GitG0r0 5d7d4a8c1d Merge branch 'main' of https://git.mdnd-it.cc/Donat/SerpentRace into cdjavitasok 2025-11-05 13:46:09 +01:00