lbry-desktop/ui/page/top/view.jsx

34 lines
855 B
React
Raw Normal View History

2020-02-11 20:04:51 +01:00
// @flow
import React from 'react';
import Page from 'component/page';
import ClaimListDiscover from 'component/claimListDiscover';
import ClaimEffectiveAmount from 'component/claimEffectiveAmount';
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}
defaultFreshness={FRESH_ALL}
defaultOrderBy={ORDER_BY_TOP}
2020-02-12 19:59:48 +01:00
includeSupportAction
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;