Description
The navbar has a link to /upcoming but the page doesn't exist. Create a dedicated upcoming battles page that displays all battles in the UPCOMING state.
Tasks
Contract Functions Used
BattleManager.battleCounter() - Get total number of battles
BattleManager.battles(uint256) - Get battle struct by ID
BattleManager.getBattleState(uint256) - Get battle state
Files to Create
frontend/app/upcoming/page.tsx (new file)
frontend/hooks/useUpcomingBattles.ts (new file)
Files to Modify
- None (navbar already has the link)
Description
The navbar has a link to
/upcomingbut the page doesn't exist. Create a dedicated upcoming battles page that displays all battles in theUPCOMINGstate.Tasks
frontend/app/upcoming/page.tsxrouteuseUpcomingBattles()to fetch battles with stateUPCOMINGfromBattleManagerBattleCardcomponentContract Functions Used
BattleManager.battleCounter()- Get total number of battlesBattleManager.battles(uint256)- Get battle struct by IDBattleManager.getBattleState(uint256)- Get battle stateFiles to Create
frontend/app/upcoming/page.tsx(new file)frontend/hooks/useUpcomingBattles.ts(new file)Files to Modify