fix minor bugs

- remove anon option in channel dropdown when livestream tab is selected
- attempt to fill publish form with current active channel name just prior to publishing to (edge condition)
  - edge condition occurs when user fills out form fully. User switches to Post (which allows anon in drop down selector). User selects Anon channel, then switches back to the livestream tab. The form was previously updated with `channel: undefined` but does not get changed when clicking the livestream tab. So we just updated the form one last time prior to publishing as a livestream
- Show most recent livestream claim on livestream setup page instead of first livestream claim
This commit is contained in:
DispatchCommit 2021-03-13 18:49:42 -08:00
parent 70575edfb4
commit 2ac5ad0201
2 changed files with 10 additions and 2 deletions

View file

@ -314,6 +314,11 @@ function PublishForm(props: Props) {
runPublish = true;
}
// (Try to) Prevent an anon livestream claim
if (mode === PUBLISH_MODES.LIVESTREAM) {
updatePublishForm({ channel: activeChannelName });
}
if (runPublish) {
if (enablePublishPreview) {
setPreviewing(true);
@ -339,7 +344,10 @@ function PublishForm(props: Props) {
// Editing claim uri
return (
<div className="card-stack">
<ChannelSelect disabled={disabled} />
<ChannelSelect
hideAnon={mode === PUBLISH_MODES.LIVESTREAM}
disabled={disabled}
/>
<PublishFile
uri={uri}

View file

@ -74,7 +74,7 @@ export default function CreatorDashboardPage(props: Props) {
})
.then((res) => {
if (res && res.items && res.items.length > 0) {
const claim = res.items[0];
const claim = res.items[res.items.length - 1];
setLivestreamClaim(claim);
} else {
setIsFetching(false);