diff --git a/pages/search.tsx b/pages/search.tsx index a1143c71..39945715 100644 --- a/pages/search.tsx +++ b/pages/search.tsx @@ -27,6 +27,7 @@ import clear from 'public/assets/illustrations/clear.svg'; import ButtonBlob from 'src/components/buttonBlobLink'; import useDebounce from 'src/utils/use-debounce'; import Button from 'src/components/button'; +import Head from 'next/head'; const appId = process.env.NEXT_PUBLIC_ALGOLIA_APP_ID || ''; const apiKey = process.env.NEXT_PUBLIC_ALGOLIA_READ_KEY || ''; @@ -42,8 +43,32 @@ type SearchPageProps = { export default function Search(props: SearchPageProps) { const userInfo = useUserdata(); + const searchQuery = encodeURIComponent( + props.serverState?.initialResults.handbook_content.state.query ?? '', + ); + + const firstResultPotential = ( + props.serverState?.initialResults.handbook_content.results[0]?.hits[0] + ?.content ?? 'Ikke funnet' + ).substring(0, 255); + + console.log('Dsadsa\n\n\\n\n\n\n', firstResultPotential, '\n\n\\n\n\n\n'); return ( + + + + + +

Hva leter du etter?

diff --git a/src/layouts/general/index.tsx b/src/layouts/general/index.tsx index f7e6132a..36f4f539 100644 --- a/src/layouts/general/index.tsx +++ b/src/layouts/general/index.tsx @@ -221,10 +221,15 @@ export default function GeneralLayout({ - +