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
Channel edit4 #2584
Channel edit4 #2584
Conversation
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 close, we should pull out the channel edit functionality into it's own component, and re-use any publish form logic that we can.
const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; | ||
for (let i = 0; i < 24; i += 1) text += possible.charAt(Math.floor(Math.random() * 62)); | ||
return text; | ||
}; |
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.
We already use the uuid
module, lets just use that here.
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.
flow doesn't like import {v4 as uuidv4} from uuid;
src/ui/page/channel/view.jsx
Outdated
} else if (bid <= MINIMUM_PUBLISH_BID) { | ||
setBidError(__('Your deposit must be higher')); | ||
} | ||
}; |
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.
We use this same logic in the publish form. Lets pull it into it's own function.
It can accept bid, balance, amount
and return an error if it's bad. If there is no error, update the form, if there is an error, setError
const error = checkBidStuff(amount, balance, bid)
if (error) {
setBidError(error)
} else {
setParams()
}
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.
DIdn't do this yet.
I'm thinking checkBidStuff(amount, balance, bid, errorFn, updateFn) would be the signature? Or do I misunderstand you?
updates work asset upload works channelForm component
This has been updated. |
Feature:
Channel page updates
Re: #561
Should be broken out of the channel page - probably requires useContext wrapper.
Not happy with upload function living in component.
Still a bug with updating and status messaging on submit.
Mostly unstyled.