-
Notifications
You must be signed in to change notification settings - Fork 407
refactor: UploadButton #801
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @juliusmarminge and the rest of your teammates on |
| ``` | ||
|
|
||
| <UploadButton | ||
| endpoint="mockRoute" |
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.
having these actually load instead of fetch failing helped reduce some impossible states we had weird paths for just to display in here
ae060af to
4e30034
Compare
|
|
||
| return "uploading"; | ||
| })(); | ||
| if (state === "readying") { |
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.
nit: inline return
| return `Choose File${inputProps.multiple ? `(s)` : ``}`; | ||
| } | ||
|
|
||
| if (uploadProgress === 100) { |
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.
nit: inline return
| > | ||
| {contentFieldToContent($props.content?.allowedContent, styleFieldArg) ?? | ||
| allowedContentTextLabelGenerator(permittedFileInfo?.config)} | ||
| allowedContentTextLabelGenerator(routeConfig)} |
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.
this is so much cleaner than permittedFileInfo 😅
Merge activity
|

More changes brought over from #746 but in a non-breaking, less chaotic manner.
Goal to make #802 easier