Closed cwastche closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
eternum | โ Failed (Inspect) | Jun 20, 2024 2:25pm |
โฑ๏ธ Estimated effort to review [1-5] | 4 |
๐งช Relevant tests | No |
๐ Security concerns | No |
โก Key issues to review |
Possible Bug: The useQuests hook has been refactored to remove the entityId parameter and now internally fetches the entityId using useEntities . This change could potentially break existing functionality where specific entity IDs are needed. It's crucial to ensure that this new approach doesn't affect other parts of the application relying on the useQuests hook. |
Code Duplication: There is noticeable duplication in the conditional rendering logic across various components (e.g., className computations in BuildingCard ). It might be beneficial to abstract these conditions into a more centralized method or configuration to simplify maintenance and improve readability. | |
Hardcoded Logic: The SelectPreviewBuildingMenu component contains hardcoded checks for quest names to conditionally render UI elements. This approach is prone to errors if quest names change and makes the component less flexible. Consider using a more dynamic approach to handle these conditions. |
Failed to generate code suggestions for PR
User description
PR Type
Enhancement, Tests
Description
useQuests
hook.TourProvider
for onboarding.Changes walkthrough ๐
13 files
useQuests.tsx
Enhance quest handling and descriptions in `useQuests` hook.
client/src/hooks/helpers/useQuests.tsx
QuestNames
enum for quest names.useQuests
hook to deriveentityId
fromplayerRealms
.currentQuest
andarmyHasTroops
functions.useUIStore.tsx
Add right navigation view state management.
client/src/hooks/store/useUIStore.tsx
rightNavigationView
state management.leftNavigationView
toLeftView
.main.tsx
Enable `TourProvider` for onboarding.
client/src/main.tsx - Enabled `TourProvider` with empty steps.
SelectPreviewBuilding.tsx
Integrate tour steps and quest handling in building selection.
client/src/ui/components/construction/SelectPreviewBuilding.tsx
HintBox.tsx
Display quest steps and add end-game information.
client/src/ui/components/hints/HintBox.tsx
EndGameInfo
component for post-quest guidance.EntityList.tsx
Highlight entities during quests.
client/src/ui/components/list/EntityList.tsx - Added `questing` prop to highlight entities during quests.
ArmyList.tsx
Integrate quest handling in army management.
client/src/ui/components/military/ArmyList.tsx - Integrated quest handling in army creation and enlistment.
BottomNavigation.tsx
Update bottom navigation for quest progress.
client/src/ui/modules/navigation/BottomNavigation.tsx
LeftNavigationModule.tsx
Add quest-based conditional rendering in left navigation.
client/src/ui/modules/navigation/LeftNavigationModule.tsx - Added conditional rendering and animations based on quest states.
RightNavigationModule.tsx
Add right navigation module with quest handling.
client/src/ui/modules/navigation/RightNavigationModule.tsx
TopMiddleNavigation.tsx
Disable map button during quest completion.
client/src/ui/modules/navigation/TopMiddleNavigation.tsx - Disabled map button when quests are claimable.
Steps.tsx
Comment out walkthrough minting logic.
client/src/ui/modules/onboarding/Steps.tsx - Commented out walkthrough minting logic.
tourSteps.tsx
Add tour steps for building structures.
client/src/ui/utils/tourSteps.tsx
structures.