2022-08-18 22:05:58 +00:00
|
|
|
import Layout from '../../components/layout'
|
|
|
|
import Items from '../../components/items'
|
|
|
|
import { getGetServerSideProps } from '../../api/ssrApollo'
|
|
|
|
import { ITEMS } from '../../fragments/items'
|
2022-08-23 22:34:51 +00:00
|
|
|
import RecentHeader from '../../components/recent-header'
|
2021-04-24 21:05:07 +00:00
|
|
|
|
2021-10-26 20:49:37 +00:00
|
|
|
const variables = { sort: 'recent' }
|
2022-02-17 17:23:43 +00:00
|
|
|
export const getServerSideProps = getGetServerSideProps(ITEMS, variables)
|
2021-09-30 15:46:58 +00:00
|
|
|
|
2022-02-17 17:23:43 +00:00
|
|
|
export default function Index ({ data: { items: { items, cursor } } }) {
|
2021-04-24 21:05:07 +00:00
|
|
|
return (
|
|
|
|
<Layout>
|
2022-12-01 22:22:13 +00:00
|
|
|
<RecentHeader type='posts' />
|
2021-09-30 15:46:58 +00:00
|
|
|
<Items
|
|
|
|
items={items} cursor={cursor}
|
2021-10-26 20:49:37 +00:00
|
|
|
variables={variables} rank
|
2021-09-30 15:46:58 +00:00
|
|
|
/>
|
2021-04-24 21:05:07 +00:00
|
|
|
</Layout>
|
|
|
|
)
|
|
|
|
}
|