Closed jennieramida closed 17 hours ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
celatone-frontend-staging | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 16, 2024 7:46am |
This update replaces the getFirstQueryParam
function with Zod validation for enhanced query parameter handling. Multiple components have been refactored into smaller sub-components, integrating validation to improve error handling and user feedback. The modifications aim to create more structured code and adhere to best practices in software development.
Files | Change Summary |
---|---|
src/utils/query.ts |
Replaced getFirstQueryParam with zodValidation function for query parameter validation. |
src/lib/pages/admin/* |
Refactored UpdateAdmin into sub-components, integrating Zod validation for query parameters. |
src/lib/pages/contracts/* |
Split ContractsByList into sub-components, implementing Zod validation for improved error handling. |
src/lib/pages/migrate/* |
Refactored Migrate into sub-components, utilizing Zod for query parameter validation. |
src/lib/pages/pools/* |
Introduced PoolIdBody for pool details, applying Zod validation for query parameters. |
src/lib/pages/public-project/* |
Updated ProjectDetail to ProjectDetails and added ProjectDetailsBody , implementing Zod validation for input handling. |
src/lib/pages/tx-details/* |
Enhanced transaction details handling with Zod validation for transaction hashes and introduced InvalidTx component. |
src/lib/pages/public-project/data.ts |
Modified usePublicData to accept slug parameter directly, simplifying data retrieval. |
src/lib/pages/module-details/* |
Refactored to replace FunctionTypeTabs with FunctionTypeTabIndex , improving type safety. |
src/lib/pages/interact/* |
Refactored Interact and added InteractBody , incorporating Zod validation for query parameters. |
src/lib/pages/account-details/* |
Modified AccountDetailsBodyProps to include new props for better reusability. |
src/lib/pages/tx-details/index.tsx |
Added mapTxisFailed function for transaction failure state mapping and refactored TxDetailsBody . |
src/lib/pages/tx-details/types.ts |
Introduced zTxDetailsQueryParams for validating transaction details query parameters. |
sequenceDiagram
participant User
participant Router
participant Component
participant Validation
participant Render
User->>Router: Request with query parameters
Router->>Component: Pass query parameters
Component->>Validation: Validate parameters
alt valid
Validation-->>Component: Validated parameters
Component->>Render: Render component with data
else invalid
Validation-->>Component: Invalid
Component->>Render: Show empty state
end
🐰 In the code-filled burrow, changes abound,
With Zod's bright magic, new paths are found.
Components split, like carrots in a stew,
Each checks its input, and that’s quite new!
Hopping through code, with joy I declare,
"Let’s code, dear friends, with an elegant flair!" 🥕✨
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?
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores