fix view for unauthed users

This commit is contained in:
Sean Yesmunt 2020-01-02 16:26:43 -05:00
parent ef9b34c51f
commit 7990a379fc
3 changed files with 18 additions and 15 deletions

View file

@ -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} />

View file

@ -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"

View file

@ -39,7 +39,6 @@ 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={
@ -51,7 +50,6 @@ function FollowingPage(props: Props) {
} }
uris={viewingSuggestedSubs ? suggestedSubscriptions.map(sub => `lbry://${sub.uri}`) : channelUris} uris={viewingSuggestedSubs ? suggestedSubscriptions.map(sub => `lbry://${sub.uri}`) : channelUris}
/> />
</div>
</Page> </Page>
); );
} }