Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: refacto react-hook-form logic for roles based organizations #1471

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

clegirar
Copy link
Collaborator

@clegirar clegirar commented Jan 2, 2025

Start a refacto about react-hook-form logic for roles based organizations.
The goal is to understand better the react-hook-form flow because it's a lot of abstractions. You can give your opinion if you find it more appropriate and understandable.

TODO:

  • Re-check naming, especially for zod objects and types
  • Re-check logic
  • Test the process a lot

Can't refacto ConfigureVotingFormData and OrganizationData because it's generic between all organizations, but could be cool to adapt it.

@clegirar clegirar self-assigned this Jan 2, 2025
Copy link

netlify bot commented Jan 2, 2025

Deploy Preview for teritori-dapp ready!

Name Link
🔨 Latest commit 38d8908
🔍 Latest deploy log https://app.netlify.com/sites/teritori-dapp/deploys/678688aab04c36000897b4be
😎 Deploy Preview https://deploy-preview-1471--teritori-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 2, 2025

Deploy Preview for gno-dapp ready!

Name Link
🔨 Latest commit 38d8908
🔍 Latest deploy log https://app.netlify.com/sites/gno-dapp/deploys/678688aab04c36000897b4c0
😎 Deploy Preview https://deploy-preview-1471--gno-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Signed-off-by: clegirar <[email protected]>
@@ -27,6 +29,35 @@ export type ConfigureVotingFormType = {
minutes: string;
};

export const ZodRoleObject = z.object({
Copy link
Collaborator

@n0izn0iz n0izn0iz Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't capitalize zod schemas' names as they are objects and not types

Suggested change
export const ZodRoleObject = z.object({
export const zodRoleObject = z.object({

@clegirar clegirar changed the title WIP: fix: refacto react-hook-form logic for roles based organizations fix: refacto react-hook-form logic for roles based organizations Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants