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 | โ Ready (Inspect) | Visit Preview | ๐ฌ Add feedback | Jun 28, 2024 9:46pm |
โฑ๏ธ Estimated effort to review [1-5] | 4 |
๐งช Relevant tests | No |
๐ Security concerns | No |
โก Key issues to review |
Possible Bug: The getPillageEvents function in PillageEventQueries.ts uses a hardcoded query string that includes the realm ID directly in the template string. This could potentially lead to GraphQL injection if not properly sanitized. |
Code Duplication: There is noticeable duplication in the useQuests function within useQuestStore.tsx , particularly in the quest definitions. Consider refactoring to a more data-driven approach to reduce redundancy and improve maintainability. | |
Inconsistent Naming: The use of both currentQuest and selectedQuest across different components could lead to confusion. It would be beneficial to standardize the naming convention across all files. |
Failed to generate code suggestions for PR
PR Type
Enhancement, Tests
Description
QuestName
enum.depth
attribute toQuest
interface.selectedQuest
instead ofcurrentQuest
.HintBox
with a back button and a newQuestRewards
component.getPillageEvents
to fetch pillage events.Changes walkthrough ๐
13 files
PillageEventQueries.ts
Add function to fetch pillage events
client/src/dojo/events/PillageEventQueries.ts
getPillageEvents
to fetch pillage events.client.request
to query events.useQuestStore.tsx
Add new quest types and depth attribute
client/src/hooks/store/useQuestStore.tsx
QuestName
enum.depth
attribute toQuest
interface.useQuestStore
to handle new quest types and depth.SelectPreviewBuilding.tsx
Update quest selection logic in SelectPreviewBuilding
client/src/ui/components/construction/SelectPreviewBuilding.tsx
currentQuest
withselectedQuest
.selectedQuest
.HintBox.tsx
Enhance HintBox with rewards and back button
client/src/ui/components/hints/HintBox.tsx
QuestRewards
component to display quest rewards.HintBox
.ArmyList.tsx
Update quest selection logic in ArmyList
client/src/ui/components/military/ArmyList.tsx
currentQuest
withselectedQuest
.selectedQuest
.StructureCard.tsx
Add className prop to StructureCard
client/src/ui/components/structures/construction/StructureCard.tsx - Added `className` prop to `StructureCard`.
StructureConstructionMenu.tsx
Update quest selection logic in StructureConstructionMenu
client/src/ui/components/structures/construction/StructureConstructionMenu.tsx
currentQuest
withselectedQuest
.BottomNavigation.tsx
Update quest selection logic in BottomNavigation
client/src/ui/modules/navigation/BottomNavigation.tsx
currentQuest
withselectedQuest
.selectedQuest
.LeftNavigationModule.tsx
Update quest selection logic in LeftNavigationModule
client/src/ui/modules/navigation/LeftNavigationModule.tsx
currentQuest
withselectedQuest
.selectedQuest
.RightNavigationModule.tsx
Update quest selection logic in RightNavigationModule
client/src/ui/modules/navigation/RightNavigationModule.tsx
currentQuest
withselectedQuest
.selectedQuest
.TopMiddleNavigation.tsx
Update quest selection logic in TopMiddleNavigation
client/src/ui/modules/navigation/TopMiddleNavigation.tsx
currentQuest
withselectedQuest
.WorldStructuresMenu.tsx
Add questing prop to EntityList in WorldStructuresMenu
client/src/ui/modules/world-structures/WorldStructuresMenu.tsx - Added questing prop to `EntityList` for hyperstructures.
resources.ts
Add new quest types and rewards
sdk/packages/eternum/src/constants/resources.ts
QuestType
enum.QUEST_RESOURCES
with new quest rewards.2 files
useEntities.tsx
Fix indentation in useEntities hook
client/src/hooks/helpers/useEntities.tsx - Fixed indentation for better readability.
tsconfig.json
Add newline at end of tsconfig.json
bot/tsconfig.json - Added newline at the end of the file.