reset livestream claims when active channel changes
This commit is contained in:
parent
204f24354f
commit
6d07d1b672
1 changed files with 2 additions and 4 deletions
|
@ -9,12 +9,10 @@ import ChannelSelector from 'component/channelSelector';
|
||||||
import Yrbl from 'component/yrbl';
|
import Yrbl from 'component/yrbl';
|
||||||
import { Lbry } from 'lbry-redux';
|
import { Lbry } from 'lbry-redux';
|
||||||
import { toHex } from 'util/hex';
|
import { toHex } from 'util/hex';
|
||||||
import ClaimPreview from 'component/claimPreview';
|
|
||||||
import { FormField } from 'component/common/form';
|
import { FormField } from 'component/common/form';
|
||||||
import CopyableText from 'component/copyableText';
|
import CopyableText from 'component/copyableText';
|
||||||
import Card from 'component/common/card';
|
import Card from 'component/common/card';
|
||||||
import ClaimList from 'component/claimList';
|
import ClaimList from 'component/claimList';
|
||||||
import livestream from '../livestream';
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
channels: Array<ChannelClaim>,
|
channels: Array<ChannelClaim>,
|
||||||
|
@ -42,12 +40,10 @@ export default function LivestreamSetupPage(props: Props) {
|
||||||
hexdata: toHex(channelClaim.name),
|
hexdata: toHex(channelClaim.name),
|
||||||
})
|
})
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
console.log(data);
|
|
||||||
setSigData(data);
|
setSigData(data);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
setSigData({ signature: null, signing_ts: null });
|
setSigData({ signature: null, signing_ts: null });
|
||||||
console.error(error);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,10 +75,12 @@ export default function LivestreamSetupPage(props: Props) {
|
||||||
const claim = res.items[res.items.length - 1];
|
const claim = res.items[res.items.length - 1];
|
||||||
setLivestreamClaims(res.items.reverse());
|
setLivestreamClaims(res.items.reverse());
|
||||||
} else {
|
} else {
|
||||||
|
setLivestreamClaims([]);
|
||||||
setIsFetching(false);
|
setIsFetching(false);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
setLivestreamClaims([]);
|
||||||
setIsFetching(false);
|
setIsFetching(false);
|
||||||
});
|
});
|
||||||
}, [activeChannelClaimStr]);
|
}, [activeChannelClaimStr]);
|
||||||
|
|
Loading…
Reference in a new issue