-
Notifications
You must be signed in to change notification settings - Fork 440
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
refactor: simplify the image uploader #1561
refactor: simplify the image uploader #1561
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, I liked the toast so much that I actually just completely removed the controlled image uploader and added the toast inside the simple uploader's error handler - let's just use this one until we don't need a more complex solution!
* feat: simple guild page * feat: simple create guild page * fix: better schema names * fix(CreateGuildButton): stringify body only once * fix: use `onTouched` form mode * feat: implement image uploader, improve fetcher and error messages * feat: add background image * feat: add success and error toasts * feat(ImageUploader): `onFileInputChange` prop * fix: add `aria-required` attributes * refactor: simplify the image uploader (#1561) * fix: address typo in request pathname * feat: add option for toast instead of form message * refactor: simplify the image uploader --------- Co-authored-by: BrickheadJohnny <[email protected]> --------- Co-authored-by: Dominik Stumpf <[email protected]>
Replaced form error message on image uploader with toast as it's also a request like form submit. We could also remove the
FormErrorMessage
and use the toast inside theControlledImageUploader
. Let me know your thoughts on this one.