fix tabindexes

This commit is contained in:
zeppi 2021-07-01 12:52:08 -04:00 committed by jessopb
parent e9868e37a1
commit 9c8c00a21f

View file

@ -22,12 +22,9 @@ import ClaimSupportButton from 'component/claimSupportButton';
import ChannelStakedIndicator from 'component/channelStakedIndicator';
import ClaimMenuList from 'component/claimMenuList';
import Yrbl from 'component/yrbl';
import I18nMessage from '../../component/i18nMessage';
export const PAGE_VIEW_QUERY = `view`;
const CONTENT_PAGE = 'content';
const LISTS_PAGE = 'lists';
const REPOSTS_PAGE = 'reposts';
const ABOUT_PAGE = `about`;
export const DISCUSSION_PAGE = `discussion`;
const EDIT_PAGE = 'edit';
@ -105,28 +102,6 @@ function ChannelPage(props: Props) {
const hasUnpublishedCollections = unpublishedCollections && Object.keys(unpublishedCollections).length;
let collectionEmpty;
if (channelIsMine) {
collectionEmpty = hasUnpublishedCollections ? (
<section className="main--empty">
{
<p>
<I18nMessage
tokens={{
pick: <Button button="link" navigate={`/$/${PAGES.LISTS}`} label={__('Pick')} />,
}}
>
You have unpublished lists! %pick% one and publish it!
</I18nMessage>
</p>
}
</section>
) : (
<section className="main--empty">{__('You have no lists! Create one from any playable content.')}</section>
);
} else {
collectionEmpty = <section className="main--empty">{__('No Lists Found')}</section>;
}
let channelIsBlackListed = false;
if (claim && blackListedOutpoints) {
@ -143,17 +118,11 @@ function ChannelPage(props: Props) {
case CONTENT_PAGE:
tabIndex = 0;
break;
case LISTS_PAGE:
case ABOUT_PAGE:
tabIndex = 1;
break;
case REPOSTS_PAGE:
tabIndex = 2;
break;
case ABOUT_PAGE:
tabIndex = 3;
break;
case DISCUSSION_PAGE:
tabIndex = 4;
tabIndex = 2
break;
default:
tabIndex = 0;
@ -167,10 +136,6 @@ function ChannelPage(props: Props) {
if (newTabIndex === 0) {
search += `${PAGE_VIEW_QUERY}=${CONTENT_PAGE}`;
} else if (newTabIndex === 1) {
search += `${PAGE_VIEW_QUERY}=${LISTS_PAGE}`;
} else if (newTabIndex === 2) {
search += `${PAGE_VIEW_QUERY}=${REPOSTS_PAGE}`;
} else if (newTabIndex === 3) {
search += `${PAGE_VIEW_QUERY}=${ABOUT_PAGE}`;
} else {
search += `${PAGE_VIEW_QUERY}=${DISCUSSION_PAGE}`;