Closed aymericdelab closed 3 weeks 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 19, 2024 2:16pm |
β±οΈ Estimated effort to review [1-5] | 3 |
π§ͺ Relevant tests | No |
π Security concerns | No |
β‘ Key issues to review |
Possible Bug: The currentArmiesTick parameter is added to various functions and methods, but it's unclear if all necessary parts of the codebase that interact with these functions have been updated to pass this parameter. This could lead to runtime errors if the parameter is not provided. |
Code Consistency: The addition of currentArmiesTick across multiple files suggests a significant change in how state is managed regarding ticks. It would be beneficial to ensure that there is a consistent and error-free implementation across all affected functions. |
Category | Suggestion | Score |
Possible bug |
Handle cases where no valid entity IDs are returned in
___
**Ensure that the | 9 |
Possible issue |
Add error handling to the
___
**Consider adding error handling for the | 8 |
Include
___
**Update the | 7 | |
Maintainability |
Refactor stamina update logic in
___
**Refactor the | 6 |
User description
PR Type
Bug fix, Enhancement
Description
currentArmiesTick
parameter to various interfaces and functions to ensure the current tick is considered in stamina and travel calculations.currentArmiesTick
parameter.Changes walkthrough π
useExplore.tsx
Include `currentArmiesTick` in exploration functions.
client/src/hooks/helpers/useExplore.tsx
currentArmiesTick
toExploreHexProps
interface.optimisticExplore
andexploreHex
functions to includecurrentArmiesTick
parameter.useStamina.tsx
Add `currentArmiesTick` to stamina functions.
client/src/hooks/helpers/useStamina.tsx
currentArmiesTick
parameter togetStamina
andoptimisticStaminaUpdate
functions.useTravel.tsx
Include `currentArmiesTick` in travel functions.
client/src/hooks/helpers/useTravel.tsx
currentArmiesTick
toTravelToHexProps
interface.optimisticTravelHex
andtravelToHex
functions to includecurrentArmiesTick
parameter.useEventHandlers.tsx
Pass `currentArmiesTick` to event handlers.
client/src/ui/components/worldmap/hexagon/useEventHandlers.tsx
currentArmiesTick
fromuseBlockchainStore
.handleTravelClick
andhandleExploreClick
functions to includecurrentArmiesTick
parameter.LeftNavigationModule.tsx
Include `currentArmiesTick` in navigation module.
client/src/ui/modules/navigation/LeftNavigationModule.tsx
currentArmiesTick
fromuseBlockchainStore
.armiesWithStaminaLeft
to includecurrentArmiesTick
.