2018-03-26 23:32:43 +02:00
|
|
|
// @flow
|
2019-07-08 19:06:42 +02:00
|
|
|
import * as PAGES from 'constants/pages';
|
2017-12-21 22:08:54 +01:00
|
|
|
import React from 'react';
|
2019-06-19 07:05:43 +02:00
|
|
|
import ClaimListDiscover from 'component/claimListDiscover';
|
2019-06-11 20:10:58 +02:00
|
|
|
import TagsSelect from 'component/tagsSelect';
|
2018-03-26 23:32:43 +02:00
|
|
|
import Page from 'component/page';
|
2019-07-01 03:52:38 +02:00
|
|
|
import Button from 'component/button';
|
2017-12-08 21:14:35 +01:00
|
|
|
|
2018-03-26 23:32:43 +02:00
|
|
|
type Props = {
|
2019-06-11 20:10:58 +02:00
|
|
|
followedTags: Array<Tag>,
|
2019-09-26 18:07:11 +02:00
|
|
|
email: string,
|
2018-03-26 23:32:43 +02:00
|
|
|
};
|
2017-12-08 21:14:35 +01:00
|
|
|
|
2019-06-11 20:10:58 +02:00
|
|
|
function DiscoverPage(props: Props) {
|
2019-09-26 18:07:11 +02:00
|
|
|
const { followedTags, email } = props;
|
2019-06-28 09:33:07 +02:00
|
|
|
|
2019-06-11 20:10:58 +02:00
|
|
|
return (
|
2019-06-17 22:32:38 +02:00
|
|
|
<Page>
|
2019-09-27 20:56:15 +02:00
|
|
|
{(email || !IS_WEB) && <TagsSelect showClose title={__('Customize Your Homepage')} />}
|
2019-06-19 07:05:43 +02:00
|
|
|
<ClaimListDiscover
|
2019-09-26 18:07:11 +02:00
|
|
|
hideCustomization={IS_WEB && !email}
|
2019-07-17 22:49:06 +02:00
|
|
|
personalView
|
2019-06-11 20:10:58 +02:00
|
|
|
tags={followedTags.map(tag => tag.name)}
|
2019-10-15 20:53:55 +02:00
|
|
|
meta={<Button button="link" label={__('Customize')} requiresAuth={IS_WEB} navigate={`/$/${PAGES.FOLLOWING}`} />}
|
2019-06-11 20:10:58 +02:00
|
|
|
/>
|
|
|
|
</Page>
|
|
|
|
);
|
2017-05-04 05:44:08 +02:00
|
|
|
}
|
|
|
|
|
2017-05-25 18:29:56 +02:00
|
|
|
export default DiscoverPage;
|