---
import { SearchPage } from '../components/Views/Search'
import Zine from '../layouts/zine.astro'
import { apiClient } from '../utils/apiClient'

const params: URLSearchParams = Astro.url.searchParams
const q = params.get('q')
const results = await apiClient.getSearchResults({ query: q, limit: 50, offset: 0 })
---

<Zine>
  <SearchPage results={results} query={q} client:load />
</Zine>
