stacker.news/components/past-bounties.js

28 lines
660 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
2023-07-24 18:35:05 +00:00
header={<div className='fw-bold'>{item.user.name}'s bounties</div>}
2023-01-26 16:11:55 +00:00
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
}
/>
)
}