fix view for unauthed users
This commit is contained in:
parent
ef9b34c51f
commit
7990a379fc
3 changed files with 18 additions and 15 deletions
|
@ -65,6 +65,7 @@ function AppRouter(props: Props) {
|
||||||
const {
|
const {
|
||||||
currentScroll,
|
currentScroll,
|
||||||
location: { pathname },
|
location: { pathname },
|
||||||
|
isAuthenticated,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -78,7 +79,11 @@ function AppRouter(props: Props) {
|
||||||
<Route path={`/$/${PAGES.AUTH}`} exact component={SignInPage} />
|
<Route path={`/$/${PAGES.AUTH}`} exact component={SignInPage} />
|
||||||
<Route path={`/$/${PAGES.TAGS}`} exact component={TagsPage} />
|
<Route path={`/$/${PAGES.TAGS}`} exact component={TagsPage} />
|
||||||
<Route path={`/$/${PAGES.TAGS_FOLLOWING}`} exact component={TagsFollowingPage} />
|
<Route path={`/$/${PAGES.TAGS_FOLLOWING}`} exact component={TagsFollowingPage} />
|
||||||
<Route path={`/$/${PAGES.CHANNELS_FOLLOWING}`} exact component={ChannelsFollowingPage} />
|
<Route
|
||||||
|
path={`/$/${PAGES.CHANNELS_FOLLOWING}`}
|
||||||
|
exact
|
||||||
|
component={isAuthenticated ? ChannelsFollowingPage : DiscoverPage}
|
||||||
|
/>
|
||||||
<Route path={`/$/${PAGES.CHANNELS_FOLLOWING_MANAGE}`} exact component={ChannelsFollowingManagePage} />
|
<Route path={`/$/${PAGES.CHANNELS_FOLLOWING_MANAGE}`} exact component={ChannelsFollowingManagePage} />
|
||||||
<Route path={`/$/${PAGES.HELP}`} exact component={HelpPage} />
|
<Route path={`/$/${PAGES.HELP}`} exact component={HelpPage} />
|
||||||
<Route path={`/$/${PAGES.AUTH_VERIFY}`} exact component={SignInVerifyPage} />
|
<Route path={`/$/${PAGES.AUTH_VERIFY}`} exact component={SignInVerifyPage} />
|
||||||
|
|
|
@ -32,7 +32,7 @@ function ChannelsFollowing(props: Props) {
|
||||||
<Page>
|
<Page>
|
||||||
{showTab ? (
|
{showTab ? (
|
||||||
<ClaimList
|
<ClaimList
|
||||||
headerLabel={__('Find Channels To Follow')}
|
header={__('Find Channels to Follow')}
|
||||||
headerAltControls={
|
headerAltControls={
|
||||||
<Button
|
<Button
|
||||||
button="link"
|
button="link"
|
||||||
|
|
|
@ -39,19 +39,17 @@ function FollowingPage(props: Props) {
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
<TagsSelect showClose={false} title={__('Follow New Tags')} />
|
<TagsSelect showClose={false} title={__('Follow New Tags')} />
|
||||||
<div className="card">
|
<ClaimList
|
||||||
<ClaimList
|
header={viewingSuggestedSubs ? __('Discover New Channels') : __('Channels You Follow')}
|
||||||
header={viewingSuggestedSubs ? __('Discover New Channels') : __('Channels You Follow')}
|
headerAltControls={
|
||||||
headerAltControls={
|
<Button
|
||||||
<Button
|
button="link"
|
||||||
button="link"
|
label={viewingSuggestedSubs ? hasSubscriptions && __('View Your Channels') : __('Find New Channels')}
|
||||||
label={viewingSuggestedSubs ? hasSubscriptions && __('View Your Channels') : __('Find New Channels')}
|
onClick={() => onClick()}
|
||||||
onClick={() => onClick()}
|
/>
|
||||||
/>
|
}
|
||||||
}
|
uris={viewingSuggestedSubs ? suggestedSubscriptions.map(sub => `lbry://${sub.uri}`) : channelUris}
|
||||||
uris={viewingSuggestedSubs ? suggestedSubscriptions.map(sub => `lbry://${sub.uri}`) : channelUris}
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue