include tabs fix from ody

This commit is contained in:
zeppi 2021-06-10 16:24:48 -04:00 committed by Thomas Zarebczan
parent 8ee5f06bfd
commit 501d1cf5f1
2 changed files with 18 additions and 3 deletions

View file

@ -26,6 +26,7 @@ import Yrbl from 'component/yrbl';
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';
@ -117,12 +118,15 @@ function ChannelPage(props: Props) {
case LISTS_PAGE:
tabIndex = 1;
break;
case ABOUT_PAGE:
case REPOSTS_PAGE:
tabIndex = 2;
break;
case DISCUSSION_PAGE:
case ABOUT_PAGE:
tabIndex = 3;
break;
case DISCUSSION_PAGE:
tabIndex = 4;
break;
default:
tabIndex = 0;
break;
@ -137,6 +141,8 @@ function ChannelPage(props: Props) {
} 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}`;
@ -252,6 +258,7 @@ function ChannelPage(props: Props) {
<TabList className="tabs__list--channel-page">
<Tab disabled={editing}>{__('Publishes')}</Tab>
<Tab disabled={editing}>{__('Playlists')}</Tab>
<Tab disabled={editing}>{__('Reposts')}</Tab>
<Tab>{editing ? __('Editing Your Channel') : __('About --[tab title in Channel Page]--')}</Tab>
<Tab disabled={editing}>{__('Community')}</Tab>
</TabList>
@ -272,6 +279,14 @@ function ChannelPage(props: Props) {
viewHiddenChannels
/>
</TabPanel>
<TabPanel>
<ChannelContent
claimType={'repost'}
uri={uri}
channelIsBlackListed={channelIsBlackListed}
viewHiddenChannels
/>
</TabPanel>
<TabPanel>
<ChannelAbout uri={uri} />
</TabPanel>

View file

@ -50,7 +50,7 @@
}
@media (max-width: $breakpoint-xsmall) {
margin-right: var(--spacing-m);
margin-right: var(--spacing-s);
}
}