stacker.news/pages/recent.js

19 lines
507 B
JavaScript

import Layout from '../components/layout'
import Items from '../components/items'
import { getGetServerSideProps } from '../api/ssrApollo'
import { ITEMS } from '../fragments/items'
const variables = { sort: 'recent' }
export const getServerSideProps = getGetServerSideProps(ITEMS, variables)
export default function Index ({ data: { items: { items, cursor } } }) {
return (
<Layout>
<Items
items={items} cursor={cursor}
variables={variables} rank
/>
</Layout>
)
}