Closed danghuy6584 closed 5 days ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
huy-final-p | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 16, 2024 11:29am |
This pull request introduces several changes to the authentication components. It enhances the Auth
module by adding exports for helper functions from login-form.helpers
and register-form.helper
. Additionally, a new validation schema for the signup form is defined using the Zod library, which includes fields for email, password, and confirm password. The Registerform
component is significantly updated to utilize the useSignup
hook and react-hook-form
with Zod validation, improving the form handling structure and functionality.
File | Change Summary |
---|---|
src/components/Auth/index.ts |
Added exports for all named exports from login-form.helpers and register-form.helper . |
src/components/Auth/register-form.helper.ts |
Introduced SignUpFormSchema for validation and signupInitValues for default form values. |
src/components/Auth/register-form.tsx |
Refactored the Registerform component to use useSignup , react-hook-form , and new form components. |
🐰 In the land of code, where rabbits roam,
New helpers emerge, making modules home.
With Zod's sweet schema, forms now align,
Passwords and emails, all perfectly fine.
So hop on this change, let the signup begin,
In the garden of code, let the fun never thin! 🐇✨
[!WARNING] There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.
🔧 eslint
> If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.src/components/Auth/index.ts
Oops! Something went wrong! :( ESLint: 9.15.0 TypeError: Error while loading rule '@typescript-eslint/no-unused-expressions': Cannot read properties of undefined (reading 'allowShortCircuit') Occurred while linting /src/components/Auth/index.ts at Object.create (/node_modules/eslint/lib/rules/no-unused-expressions.js:75:13) at create (/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js:28:32) at Object.create (/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js:31:20) at createRuleListeners (/node_modules/eslint/lib/linter/linter.js:944:21) at /node_modules/eslint/lib/linter/linter.js:1082:84 at Array.forEach () at runRules (/node_modules/eslint/lib/linter/linter.js:1013:34) at #flatVerifyWithoutProcessors (/node_modules/eslint/lib/linter/linter.js:1911:31) at Linter._verifyWithFlatConfigArrayAndWithoutProcessors (/node_modules/eslint/lib/linter/linter.js:1993:49) at Linter._verifyWithFlatConfigArray (/node_modules/eslint/lib/linter/linter.js:2082:21)
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