Channel edit4 #2584

Merged
jessopb merged 2 commits from channelEdit4 into master 2019-07-02 19:55:55 +02:00
jessopb commented 2019-06-28 19:54:51 +02:00 (Migrated from github.com)

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.

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.
neb-b (Migrated from github.com) reviewed 2019-06-28 19:54:51 +02:00
neb-b (Migrated from github.com) requested changes 2019-07-01 03:41:48 +02:00
neb-b (Migrated from github.com) left a comment

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.

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.
neb-b (Migrated from github.com) commented 2019-07-01 03:23:08 +02:00

Not needed

Not needed
neb-b (Migrated from github.com) commented 2019-07-01 03:36:44 +02:00

We already use the uuid module, lets just use that here.

We already use the `uuid` module, lets just use that here.
@ -23,19 +26,24 @@ type Props = {
location: { search: string },
history: { push: string => void },
neb-b (Migrated from github.com) commented 2019-07-01 03:34:00 +02:00

For now lets just create a channelEdit component and put all of the edit stuff in there.

For now lets just create a `channelEdit` component and put all of the edit stuff in there.
neb-b (Migrated from github.com) commented 2019-07-01 03:34:40 +02:00

<div className="card__actions">

`<div className="card__actions">`
neb-b (Migrated from github.com) commented 2019-07-01 03:40:40 +02:00

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()
} 
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() }
jessopb (Migrated from github.com) reviewed 2019-07-02 15:28:21 +02:00
jessopb (Migrated from github.com) commented 2019-07-02 15:28:21 +02:00

flow doesn't like import {v4 as uuidv4} from uuid;

flow doesn't like import {v4 as uuidv4} from uuid;
jessopb (Migrated from github.com) reviewed 2019-07-02 15:29:22 +02:00
jessopb (Migrated from github.com) commented 2019-07-02 15:29:22 +02:00

DIdn't do this yet.
I'm thinking checkBidStuff(amount, balance, bid, errorFn, updateFn) would be the signature? Or do I misunderstand you?

DIdn't do this yet. I'm thinking checkBidStuff(amount, balance, bid, errorFn, updateFn) would be the signature? Or do I misunderstand you?
jessopb commented 2019-07-02 15:29:32 +02:00 (Migrated from github.com)

This has been updated.

This has been updated.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#2584
No description provided.