import { SearchLayout } from '../../components/layout' import { getGetServerSideProps } from '../../api/ssrApollo' import { useRouter } from 'next/router' import { SUB_SEARCH } from '../../fragments/subs' import Down from '../../svgs/arrow-down-line.svg' import Items from '../../components/items' export const getServerSideProps = getGetServerSideProps(SUB_SEARCH, null, (data, vars) => vars.sub && !data.sub) export default function Index ({ ssrData }) { const router = useRouter() const variables = { ...router.query } return ( {variables.q ? data.search} variables={variables} noMoreText='NO MORE' /> : (
search for something
)}
) }