Closed bob0005 closed 1 day 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 | Nov 20, 2024 10:51am |
eternum-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 20, 2024 10:51am |
The changes in this pull request primarily involve modifications to various components and hooks within the client application. Key updates include the introduction of a toInteger
utility function, adjustments to import statements for the throttle
function from lodash, and enhancements to type safety through explicit type annotations. The useHyperstructures
hook and related functions have been updated to ensure percentage values are consistently returned as integers. Overall, the changes aim to streamline code clarity and improve type safety without altering the core functionality of the components.
File Path | Change Summary |
---|---|
client/src/hooks/helpers/useHyperstructures.tsx |
Added import for toInteger , updated percentage handling in useGetHyperstructureProgress , useHyperstructureProgress , and getAllProgressesAndTotalPercentage to return integers. |
client/src/hooks/store/useLeaderBoardStore.tsx |
Added options object to defineQuery for HyperstructureCoOwnersChange to run on initialization. |
client/src/three/GameRenderer.ts |
Changed lodash import from wildcard to specific throttle import, minor code organization adjustments. |
client/src/three/components/Minimap.ts |
Updated lodash import for throttle , marked type imports with type , simplified labelImages declaration. |
client/src/three/components/Navigator.ts |
Updated imports for HexPosition and MapControls with type , changed lodash import for throttle . |
client/src/three/scenes/HexagonScene.ts |
Updated imports with type annotations, modified variable declarations for biomeModels and modelLoadPromises . |
client/src/three/scenes/Worldmap.ts |
Changed lodash import for throttle from wildcard to default import. |
client/src/ui/elements/BaseThreeTooltip.tsx |
Changed lodash import for throttle from named to default import. |
client/src/ui/elements/Tooltip.tsx |
Changed lodash import for throttle from named to default import. |
client/src/ui/utils/utils.tsx |
Added toInteger and capitalize utility functions, updated type annotations in imports. |
Objective | Addressed | Explanation |
---|---|---|
Remove lodash (Issue #1938) | ❌ | The changes do not remove lodash; they only modify how lodash functions are imported. |
toInteger
, relevant to the main PR's changes.In the code where rabbits play,
Functions hop and dance all day.
WithtoInteger
, we refine,
Making percentages align.
Throttle's swift, no time to waste,
Clean imports, a tidy taste! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Failed to generate code suggestions for PR
Closes #1938
Summary by CodeRabbit
Release Notes
New Features
toInteger
for converting values to integers andcapitalize
for capitalizing strings.Improvements
Code Quality
throttle
from lodash across multiple components, improving code clarity and reducing dependencies.