import Item, { ItemSkeleton } from '../../components/item'
import Layout from '../../components/layout'
import Reply, { ReplySkeleton } from '../../components/reply'
import Comment from '../../components/comment'
import Text from '../../components/text'
import Comments, { CommentsSkeleton } from '../../components/comments'
import { COMMENTS } from '../../fragments/comments'
import { ITEM_FIELDS } from '../../fragments/items'
import { gql, useQuery } from '@apollo/client'
import styles from '../../styles/item.module.css'
import Head from 'next/head'
export async function getServerSideProps ({ params: { id } }) {
return {
props: {
id
}
}
}
export default function FullItem ({ id }) {
const query = gql`
${ITEM_FIELDS}
${COMMENTS}
{
item(id: ${id}) {
...ItemFields
text
comments {
...CommentsRecursive
}
}
}`
return (