fix: add column to posts table that is a string of content to use search index on
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import SearchResults from '@/components/SearchResults';
|
||||
|
||||
export default function SearchPage({
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams: { [key: string]: string | string[] | undefined };
|
||||
}) {
|
||||
let term = searchParams.term;
|
||||
|
||||
if (term === undefined) {
|
||||
term = '';
|
||||
}
|
||||
|
||||
if (Array.isArray(term)) {
|
||||
term = term.length > 0 ? term[0] : '';
|
||||
}
|
||||
|
||||
return (
|
||||
<main className='flex flex-col items-center flex-1'>
|
||||
<div className='flex flex-col w-full max-w-4xl gap-4'>
|
||||
<h1 className='text-4xl font-bold'>Here's what we found</h1>
|
||||
<SearchResults term={term} />
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user