stacker.news/components/past-bounties.js

28 lines
669 B
JavaScript
Raw Normal View History

2023-01-26 16:11:55 +00:00
import AccordianItem from './accordian-item'
import Items from './items'
import { NavigateFooter } from './more-footer'
2023-01-26 16:11:55 +00:00
const LIMIT = 5
2023-01-26 16:11:55 +00:00
export default function PastBounties ({ item }) {
const variables = {
name: item.user.name,
sort: 'user',
type: 'bounties',
limit: LIMIT
2023-01-26 16:11:55 +00:00
}
return (
<AccordianItem
header={<div className='font-weight-bold'>{item.user.name}'s bounties</div>}
body={
<Items
variables={variables}
Footer={props => <NavigateFooter {...props} href={`/${item.user.name}/bounties`} text='view all past bounties' />}
filter={i => i.id !== item.id}
/>
2023-01-26 16:11:55 +00:00
}
/>
)
}