import { SearchLayout } from '../../components/layout' import { getGetServerSideProps } from '../../api/ssrApollo' import { useRouter } from 'next/router' import { SUB_SEARCH } from '../../fragments/subs' import Items from '../../components/items' import styles from './search.module.css' export const getServerSideProps = getGetServerSideProps({ query: SUB_SEARCH, notFound: (data, vars) => vars.sub && !data.sub }) export default function Index ({ ssrData }) { const router = useRouter() const variables = { ...router.query, includeComments: true } const sub = ssrData?.sub?.name || variables.sub return ( {variables.q ? data.search} variables={variables} noMoreText='NO MORE' /> : (
more filters
nym:sn - limit results by stacker nym
url:stacker​.news - limit to specific site
"exact phrase" - demand results contain exact phrase
you are searching {variables.sub || 'home'}
home searches show results from all
)}
) }