mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-01 01:35:11 +00:00
fix tabindexes
This commit is contained in:
parent
e9868e37a1
commit
9c8c00a21f
1 changed files with 2 additions and 37 deletions
|
@ -22,12 +22,9 @@ import ClaimSupportButton from 'component/claimSupportButton';
|
||||||
import ChannelStakedIndicator from 'component/channelStakedIndicator';
|
import ChannelStakedIndicator from 'component/channelStakedIndicator';
|
||||||
import ClaimMenuList from 'component/claimMenuList';
|
import ClaimMenuList from 'component/claimMenuList';
|
||||||
import Yrbl from 'component/yrbl';
|
import Yrbl from 'component/yrbl';
|
||||||
import I18nMessage from '../../component/i18nMessage';
|
|
||||||
|
|
||||||
export const PAGE_VIEW_QUERY = `view`;
|
export const PAGE_VIEW_QUERY = `view`;
|
||||||
const CONTENT_PAGE = 'content';
|
const CONTENT_PAGE = 'content';
|
||||||
const LISTS_PAGE = 'lists';
|
|
||||||
const REPOSTS_PAGE = 'reposts';
|
|
||||||
const ABOUT_PAGE = `about`;
|
const ABOUT_PAGE = `about`;
|
||||||
export const DISCUSSION_PAGE = `discussion`;
|
export const DISCUSSION_PAGE = `discussion`;
|
||||||
const EDIT_PAGE = 'edit';
|
const EDIT_PAGE = 'edit';
|
||||||
|
@ -105,28 +102,6 @@ function ChannelPage(props: Props) {
|
||||||
|
|
||||||
const hasUnpublishedCollections = unpublishedCollections && Object.keys(unpublishedCollections).length;
|
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;
|
let channelIsBlackListed = false;
|
||||||
|
|
||||||
if (claim && blackListedOutpoints) {
|
if (claim && blackListedOutpoints) {
|
||||||
|
@ -143,17 +118,11 @@ function ChannelPage(props: Props) {
|
||||||
case CONTENT_PAGE:
|
case CONTENT_PAGE:
|
||||||
tabIndex = 0;
|
tabIndex = 0;
|
||||||
break;
|
break;
|
||||||
case LISTS_PAGE:
|
case ABOUT_PAGE:
|
||||||
tabIndex = 1;
|
tabIndex = 1;
|
||||||
break;
|
break;
|
||||||
case REPOSTS_PAGE:
|
|
||||||
tabIndex = 2;
|
|
||||||
break;
|
|
||||||
case ABOUT_PAGE:
|
|
||||||
tabIndex = 3;
|
|
||||||
break;
|
|
||||||
case DISCUSSION_PAGE:
|
case DISCUSSION_PAGE:
|
||||||
tabIndex = 4;
|
tabIndex = 2
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
tabIndex = 0;
|
tabIndex = 0;
|
||||||
|
@ -167,10 +136,6 @@ function ChannelPage(props: Props) {
|
||||||
if (newTabIndex === 0) {
|
if (newTabIndex === 0) {
|
||||||
search += `${PAGE_VIEW_QUERY}=${CONTENT_PAGE}`;
|
search += `${PAGE_VIEW_QUERY}=${CONTENT_PAGE}`;
|
||||||
} else if (newTabIndex === 1) {
|
} 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}`;
|
search += `${PAGE_VIEW_QUERY}=${ABOUT_PAGE}`;
|
||||||
} else {
|
} else {
|
||||||
search += `${PAGE_VIEW_QUERY}=${DISCUSSION_PAGE}`;
|
search += `${PAGE_VIEW_QUERY}=${DISCUSSION_PAGE}`;
|
||||||
|
|
Loading…
Add table
Reference in a new issue