Help me refactor this code - forms
Unanswered
Rhinelander posted this in #help-forum
RhinelanderOP
I am 95% sure code is mostly OK or even GREAT. But again I am trying to improve and any feedback would be welcome - If code needs to be divided in separate components, if I should use react-query (already in the project), naming conventions, anything that I might be doing wrong. If you don't have much time feel free to check just 1 component and make sure to mention that. Any feedback is welcome. To make it easier here is GitHub Gist: https://gist.github.com/jan-arnez/d7d67f1221969158850ea89ea3a00640
Explanations:
This code just localizes errors that come from "better-auth" - located in lib/auth-error.tsx
For all forms schemas are in file called "lib/definitions.ts" (feature / module based folder structure)
Explanations:
This code just localizes errors that come from "better-auth" - located in lib/auth-error.tsx
getErrorMessage(error.code)
For all forms schemas are in file called "lib/definitions.ts" (feature / module based folder structure)