remove suggested subs from tags manage page
This commit is contained in:
parent
0b38bb1f1a
commit
0094f20190
7 changed files with 24 additions and 64 deletions
|
@ -943,5 +943,9 @@
|
|||
"Accepted": "Accepted",
|
||||
"Claimable": "Claimable",
|
||||
"Invite A Friend": "Invite A Friend",
|
||||
"Navigation": "Navigation"
|
||||
"Navigation": "Navigation",
|
||||
"Sign In to lbry.tv to Earn Rewards": "Sign In to lbry.tv to Earn Rewards",
|
||||
"Unlock Rewards": "Unlock Rewards",
|
||||
"A lbry.tv account allows you to earn more than %credit_amount% in rewards, backup your data, and get content and security updates.": "A lbry.tv account allows you to earn more than %credit_amount% in rewards, backup your data, and get content and security updates.",
|
||||
"Deposit cannot be higher than your balance": "Deposit cannot be higher than your balance"
|
||||
}
|
|
@ -155,7 +155,7 @@ const Header = (props: Props) => {
|
|||
</MenuItem>
|
||||
|
||||
{/* @if TARGET='app' */}
|
||||
<MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.PUBLISH}`)}>
|
||||
<MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.LIBRARY}`)}>
|
||||
<Icon aria-hidden icon={ICONS.LIBRARY} />
|
||||
{__('Library')}
|
||||
</MenuItem>
|
||||
|
|
|
@ -21,7 +21,7 @@ import TagsPage from 'page/tags';
|
|||
import TagsFollowingPage from 'page/tagsFollowing';
|
||||
import ChannelsFollowingPage from 'page/channelsFollowing';
|
||||
import ChannelsFollowingManagePage from 'page/channelsFollowingManage';
|
||||
import FollowingPage from 'page/following';
|
||||
import TagsFollowingManagePage from 'page/tagsFollowingManage';
|
||||
import ListBlockedPage from 'page/listBlocked';
|
||||
import FourOhFourPage from 'page/fourOhFour';
|
||||
import SignInPage from 'page/signIn';
|
||||
|
@ -98,7 +98,7 @@ function AppRouter(props: Props) {
|
|||
<PrivateRoute {...props} path={`/$/${PAGES.REWARDS}`} component={RewardsPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.TRANSACTIONS}`} component={TransactionHistoryPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.LIBRARY}`} component={LibraryPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.TAGS_FOLLOWING_MANAGE}`} component={FollowingPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.TAGS_FOLLOWING_MANAGE}`} component={TagsFollowingManagePage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.BLOCKED}`} component={ListBlockedPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.WALLET}`} exact component={WalletPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.CHANNELS}`} component={ChannelsPage} />
|
||||
|
|
|
@ -9,7 +9,6 @@ import Icon from 'component/common/icon';
|
|||
import * as ICONS from '../../constants/icons';
|
||||
import { FormField } from '../../component/common/form-components/form-field';
|
||||
import { withRouter } from 'react-router';
|
||||
import Page from 'component/page';
|
||||
|
||||
type Props = {
|
||||
fetching: boolean,
|
||||
|
@ -36,7 +35,7 @@ function FileListDownloaded(props: Props) {
|
|||
}
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<React.Fragment>
|
||||
{hasDownloads ? (
|
||||
<React.Fragment>
|
||||
<ClaimList
|
||||
|
@ -73,7 +72,7 @@ function FileListDownloaded(props: Props) {
|
|||
</section>
|
||||
</div>
|
||||
)}
|
||||
</Page>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
// @flow
|
||||
import * as PAGES from 'constants/pages';
|
||||
import React, { useEffect } from 'react';
|
||||
import Page from 'component/page';
|
||||
import TagsSelect from 'component/tagsSelect';
|
||||
import ClaimList from 'component/claimList';
|
||||
import Button from 'component/button';
|
||||
|
||||
type Props = {
|
||||
subscribedChannels: Array<Subscription>,
|
||||
location: { search: string },
|
||||
history: { push: string => void },
|
||||
doFetchRecommendedSubscriptions: () => void,
|
||||
suggestedSubscriptions: Array<{ uri: string }>,
|
||||
};
|
||||
|
||||
function FollowingPage(props: Props) {
|
||||
const { subscribedChannels, location, history, doFetchRecommendedSubscriptions, suggestedSubscriptions } = props;
|
||||
const hasSubscriptions = !!subscribedChannels.length;
|
||||
const channelUris = subscribedChannels.map(({ uri }) => uri);
|
||||
|
||||
const { search } = location;
|
||||
const urlParams = new URLSearchParams(search);
|
||||
const viewingSuggestedSubs = urlParams.get('view') || !hasSubscriptions;
|
||||
|
||||
function onClick() {
|
||||
let url = `/$/${PAGES.TAGS_FOLLOWING_MANAGE}`;
|
||||
if (!viewingSuggestedSubs) {
|
||||
url += '?view=discover';
|
||||
}
|
||||
|
||||
history.push(url);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
doFetchRecommendedSubscriptions();
|
||||
}, [doFetchRecommendedSubscriptions]);
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<TagsSelect showClose={false} title={__('Follow New Tags')} />
|
||||
<ClaimList
|
||||
header={viewingSuggestedSubs ? __('Discover New Channels') : __('Channels You Follow')}
|
||||
headerAltControls={
|
||||
<Button
|
||||
button="link"
|
||||
label={viewingSuggestedSubs ? hasSubscriptions && __('View Your Channels') : __('Find New Channels')}
|
||||
onClick={() => onClick()}
|
||||
/>
|
||||
}
|
||||
uris={viewingSuggestedSubs ? suggestedSubscriptions.map(sub => `lbry://${sub.uri}`) : channelUris}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default FollowingPage;
|
14
ui/page/tagsFollowingManage/view.jsx
Normal file
14
ui/page/tagsFollowingManage/view.jsx
Normal file
|
@ -0,0 +1,14 @@
|
|||
// @flow
|
||||
import React from 'react';
|
||||
import Page from 'component/page';
|
||||
import TagsSelect from 'component/tagsSelect';
|
||||
|
||||
function FollowingPage() {
|
||||
return (
|
||||
<Page>
|
||||
<TagsSelect showClose={false} title={__('Follow New Tags')} />
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default FollowingPage;
|
Loading…
Add table
Reference in a new issue