import { getGetServerSideProps } from '../../../api/ssrApollo' import { SUB } from '../../../fragments/subs' import LayoutCenter from '../../../components/layout-center' import JobForm from '../../../components/job-form' import Link from 'next/link' import { Button } from 'react-bootstrap' import AccordianItem from '../../../components/accordian-item' import { useMe } from '../../../components/me' import { useRouter } from 'next/router' import { DiscussionForm } from '../../../components/discussion-form' import { LinkForm } from '../../../components/link-form' import { PollForm } from '../../../components/poll-form' import { BountyForm } from '../../../components/bounty-form' import { SubSelect } from '../../post' export const getServerSideProps = getGetServerSideProps(SUB, null, data => !data.sub) export function PostForm ({ type, sub }) { const me = useMe() const prefix = sub?.name ? `/~${sub.name}` : '' if (!type) { return (