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

35 lines
901 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';
2020-02-11 20:04:51 +01:00
import { TYPE_TOP, TIME_ALL } from 'component/claimListDiscover/view';
type Props = {
name: string,
};
function TopPage(props: Props) {
const { name } = props;
return (
<Page>
<ClaimListDiscover
name={name}
defaultTypeSort={TYPE_TOP}
defaultTimeSort={TIME_ALL}
defaultOrderBy={['effective_amount']}
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;