Closed aymericdelab closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
eternum | โ Ready (Inspect) | Visit Preview | ๐ฌ Add feedback | Jun 13, 2024 1:04pm |
โฑ๏ธ Estimated effort to review [1-5] | 3 |
๐งช Relevant tests | No |
๐ Security concerns | No |
โก Key issues to review |
Possible Bug: In `Battles.tsx`, the `onClick` function in `BattleModel` is not being called correctly. It should be `onClick()` instead of just `onClick`. |
Data Integrity: In `Armies.tsx`, the filtering logic for armies not in battle checks if `army.battle_id === 0n`. Ensure that this condition correctly identifies armies not in battle based on the system's data structure and logic. | |
Code Clarity: In `BattleLabel.tsx`, the `onClick` function is commented as "todo: implement this" and the actual function call in the `Button` component is incorrect (`onClick;` should be `onClick()`). |
Category | Suggestion | Score |
Possible bug |
Add a check to ensure
___
**Ensure that the | 9 |
Best practice |
Replace
___
**Replace the | 8 |
Specify a more detailed type for
___
**Use a more specific type for | 8 | |
Initialize
___
**Initialize | 7 |
PR Type
Enhancement, Tests
Description
useBattles
._mapStore
.Battles
component to display battle models and handle battle selection.Armies
component.BattleLabel
component with a button to view battle details.Battles
component intoWorldHexagon
.Changes walkthrough ๐
useBattles.tsx
Include position data in battle entities.
client/src/hooks/helpers/useBattles.tsx
_mapStore.tsx
Add state management for selected battles.
client/src/hooks/store/_mapStore.tsx
Battles.tsx
Create Battles component to display battle models.
client/src/ui/components/models/buildings/worldmap/Battles.tsx
Armies.tsx
Filter out armies in battle.
client/src/ui/components/worldmap/armies/Armies.tsx - Filtered out armies that are currently in a battle.
BattleLabel.tsx
Create BattleLabel component for battle details.
client/src/ui/components/worldmap/armies/BattleLabel.tsx
WorldHexagon.tsx
Integrate Battles component into WorldMap.
client/src/ui/components/worldmap/hexagon/WorldHexagon.tsx - Added Battles component to WorldMap.