2022-08-18 22:05:58 +00:00
|
|
|
import Layout from '../../components/layout'
|
|
|
|
import { getGetServerSideProps } from '../../api/ssrApollo'
|
|
|
|
import { MORE_FLAT_COMMENTS } from '../../fragments/comments'
|
|
|
|
import CommentsFlat from '../../components/comments-flat'
|
2022-08-23 22:34:51 +00:00
|
|
|
import RecentHeader from '../../components/recent-header'
|
2022-08-18 22:05:58 +00:00
|
|
|
|
|
|
|
const variables = { sort: 'recent' }
|
|
|
|
export const getServerSideProps = getGetServerSideProps(MORE_FLAT_COMMENTS, variables)
|
|
|
|
|
|
|
|
export default function Index ({ data: { moreFlatComments: { comments, cursor } } }) {
|
|
|
|
return (
|
|
|
|
<Layout>
|
2022-12-01 22:22:13 +00:00
|
|
|
<RecentHeader type='comments' />
|
2022-08-18 22:05:58 +00:00
|
|
|
<CommentsFlat
|
|
|
|
comments={comments} cursor={cursor}
|
|
|
|
variables={{ sort: 'recent' }} includeParent noReply
|
|
|
|
/>
|
|
|
|
</Layout>
|
|
|
|
)
|
|
|
|
}
|