Empty states for channel tabs

This commit is contained in:
zeppi 2021-06-10 17:01:32 -04:00 committed by Thomas Zarebczan
parent 501d1cf5f1
commit d55ef7e899
3 changed files with 17 additions and 0 deletions

View file

@ -33,6 +33,7 @@ type Props = {
viewHiddenChannels: boolean,
doResolveUris: (Array<string>, boolean) => void,
claimType: string,
empty?: string,
};
function ChannelContent(props: Props) {
@ -51,6 +52,7 @@ function ChannelContent(props: Props) {
viewHiddenChannels,
doResolveUris,
claimType,
empty,
} = props;
const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0;
const [searchQuery, setSearchQuery] = React.useState('');
@ -164,6 +166,7 @@ function ChannelContent(props: Props) {
}
isChannel
channelIsMine={channelIsMine}
empty={empty}
/>
) : (
<section className="main--empty">{__("This channel hasn't published anything yet")}</section>

View file

@ -74,6 +74,7 @@ type Props = {
hasSource?: boolean,
isChannel?: boolean,
channelIsMine?: boolean,
empty?: string,
};
function ClaimListDiscover(props: Props) {
@ -130,6 +131,7 @@ function ClaimListDiscover(props: Props) {
hasSource,
isChannel = false,
channelIsMine = false,
empty,
} = props;
const didNavigateForward = history.action === 'PUSH';
const { search } = location;
@ -546,6 +548,7 @@ function ClaimListDiscover(props: Props) {
liveLivestreamsFirst={liveLivestreamsFirst}
livestreamMap={livestreamMap}
searchOptions={options}
empty={empty}
/>
{loading &&
new Array(dynamicPageSize)

View file

@ -269,6 +269,7 @@ function ChannelPage(props: Props) {
uri={uri}
channelIsBlackListed={channelIsBlackListed}
viewHiddenChannels
empty={__('No Content Found')}
/>
</TabPanel>
<TabPanel>
@ -277,6 +278,16 @@ function ChannelPage(props: Props) {
uri={uri}
channelIsBlackListed={channelIsBlackListed}
viewHiddenChannels
empty={__('No Lists Found')}
/>
</TabPanel>
<TabPanel>
<ChannelContent
claimType={'repost'}
uri={uri}
channelIsBlackListed={channelIsBlackListed}
viewHiddenChannels
empty={__('No Reposts Found')}
/>
</TabPanel>
<TabPanel>