stacker.news/pages/recent/comments.js
2022-08-18 17:05:58 -05:00

19 lines
616 B
JavaScript

import Layout from '../../components/layout'
import { getGetServerSideProps } from '../../api/ssrApollo'
import { MORE_FLAT_COMMENTS } from '../../fragments/comments'
import CommentsFlat from '../../components/comments-flat'
const variables = { sort: 'recent' }
export const getServerSideProps = getGetServerSideProps(MORE_FLAT_COMMENTS, variables)
export default function Index ({ data: { moreFlatComments: { comments, cursor } } }) {
return (
<Layout>
<CommentsFlat
comments={comments} cursor={cursor}
variables={{ sort: 'recent' }} includeParent noReply
/>
</Layout>
)
}