I'm passing an arrow function to a React Combobox component inside a dynamic pre-rendered page but getting a onSelect is not a function error. Any thoughts?
---
// other js code
export const prerender = true;
---
<BaseLayout title={tag ?? "tag"}>
<div class="flex gap-2 items-center">
<p>Posts tagged with</p>
<Combobox
initialValue={tag ?? ""}
options={tags}
onSelect={(option) => {
// this function throw and error when it is run on click
Astro.redirect(`/tags/${option}`);
}}
client:load
/>
</div>
// ...
</BaseLayout>