2020-02-11 20:04:51 +01:00
|
|
|
// @flow
|
2020-10-23 20:02:00 +02:00
|
|
|
import { SIMPLE_SITE } from 'config';
|
2020-02-11 20:04:51 +01:00
|
|
|
import React from 'react';
|
|
|
|
import Page from 'component/page';
|
|
|
|
import ClaimListDiscover from 'component/claimListDiscover';
|
2020-02-12 16:10:17 +01:00
|
|
|
import ClaimEffectiveAmount from 'component/claimEffectiveAmount';
|
2020-02-10 20:43:24 +01:00
|
|
|
import { ORDER_BY_TOP, FRESH_ALL } from 'constants/claim_search';
|
2020-02-11 20:04:51 +01:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
name: string,
|
|
|
|
};
|
|
|
|
|
|
|
|
function TopPage(props: Props) {
|
|
|
|
const { name } = props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Page>
|
|
|
|
<ClaimListDiscover
|
|
|
|
name={name}
|
2020-02-10 20:43:24 +01:00
|
|
|
defaultFreshness={FRESH_ALL}
|
|
|
|
defaultOrderBy={ORDER_BY_TOP}
|
2020-10-23 20:02:00 +02:00
|
|
|
includeSupportAction={!SIMPLE_SITE}
|
2020-02-12 16:10:17 +01:00
|
|
|
renderProperties={claim => (
|
|
|
|
<span className="media__subtitle">
|
|
|
|
<ClaimEffectiveAmount uri={claim.repost_url || claim.canonical_url} />
|
|
|
|
</span>
|
|
|
|
)}
|
2020-02-11 20:04:51 +01:00
|
|
|
header={<span>{__('Top claims at lbry://%name%', { name })}</span>}
|
|
|
|
/>
|
|
|
|
</Page>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default TopPage;
|