keyan 18910fa2ed Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"
This reverts commit d0314ab73c42ebf85fe2f418dddd681af45dbc55.
2023-07-23 09:16:12 -05:00

21 lines
768 B
JavaScript

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