Fix null active channel case (#918)
This commit is contained in:
parent
56f8d8b71a
commit
178dec7030
1 changed files with 4 additions and 1 deletions
|
@ -21,8 +21,11 @@ type HeaderMenuButtonProps = {
|
|||
|
||||
export default function HeaderProfileMenuButton(props: HeaderMenuButtonProps) {
|
||||
const { myChannelClaimIds, activeChannelClaim, authenticated, email, signOut } = props;
|
||||
const pendingChannelFetch = myChannelClaimIds === undefined;
|
||||
|
||||
const activeChannelUrl = activeChannelClaim && activeChannelClaim.permanent_url;
|
||||
// activeChannel will be: undefined = fetching, null = nothing, or { channel claim }
|
||||
const noActiveChannel = activeChannelUrl === null;
|
||||
const pendingChannelFetch = !noActiveChannel && myChannelClaimIds === undefined;
|
||||
|
||||
return (
|
||||
<div className="header__buttons">
|
||||
|
|
Loading…
Reference in a new issue