stacker.news/pages/recent.js

19 lines
530 B
JavaScript
Raw Normal View History

2021-04-24 16:05:07 -05:00
import Layout from '../components/layout'
import Items from '../components/items'
2021-10-26 15:49:37 -05:00
import { getGetServerSideProps } from '../api/ssrApollo'
2021-09-30 10:46:58 -05:00
import { MORE_ITEMS } from '../fragments/items'
2021-04-24 16:05:07 -05:00
2021-10-26 15:49:37 -05:00
const variables = { sort: 'recent' }
export const getServerSideProps = getGetServerSideProps(MORE_ITEMS, { sort: 'recent' })
2021-09-30 10:46:58 -05:00
2021-10-26 15:49:37 -05:00
export default function Index ({ data: { moreItems: { items, cursor } } }) {
2021-04-24 16:05:07 -05:00
return (
<Layout>
2021-09-30 10:46:58 -05:00
<Items
items={items} cursor={cursor}
2021-10-26 15:49:37 -05:00
variables={variables} rank
2021-09-30 10:46:58 -05:00
/>
2021-04-24 16:05:07 -05:00
</Layout>
)
}