app/search/page.tsx
// app/search/page.tsx
import { redirect } from 'next/navigation';
export default async function SearchPage({
searchParams
}: {
searchParams?: { q?: string }
}) {
// Redirect to the wines page with the search query
const query = searchParams?.q || '';
redirect(`/wines${query ? `?q=${encodeURIComponent(query)}` : ''}`);
}