diff --git a/app/instantsearch/instantsearch.tsx b/app/instantsearch/instantsearch.tsx
index 323687e..9ae4fd4 100644
--- a/app/instantsearch/instantsearch.tsx
+++ b/app/instantsearch/instantsearch.tsx
@@ -7,64 +7,70 @@ import TypesenseInstantSearchAdapter, { type SearchClient } from "typesense-inst
import { ClickablePublicationThumbnail } from "@/components/publication-cover";
import type { Publication } from "@/types/model";
-export function InstantSearch() {
- const t = useTranslations("SearchPage");
+const typesenseInstantsearchAdapter = new TypesenseInstantSearchAdapter({
+ server: {
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ apiKey: process.env.NEXT_PUBLIC_TYPESENSE_API_KEY!,
+ nodes: [
+ {
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ host: process.env.NEXT_PUBLIC_TYPESENSE_HOST!,
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ port: Number(process.env.NEXT_PUBLIC_TYPESENSE_PORT!),
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ protocol: process.env.NEXT_PUBLIC_TYPESENSE_PROTOCOL!,
+ },
+ ],
+ },
+ // The following parameters are directly passed to Typesense's search API endpoint.
+ // So you can pass any parameters supported by the search endpoint below.
+ // queryBy is required.
+ additionalSearchParameters: {
+ query_by: "title",
+ },
+});
+// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+const searchClient = typesenseInstantsearchAdapter.searchClient as unknown as SearchClient;
- const typesenseInstantsearchAdapter = new TypesenseInstantSearchAdapter({
- server: {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- apiKey: process.env.NEXT_PUBLIC_TYPESENSE_API_KEY!,
- nodes: [
- {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- host: process.env.NEXT_PUBLIC_TYPESENSE_HOST!,
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- port: Number(process.env.NEXT_PUBLIC_TYPESENSE_PORT!),
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- protocol: process.env.NEXT_PUBLIC_TYPESENSE_PROTOCOL!,
- },
- ],
- },
- // The following parameters are directly passed to Typesense's search API endpoint.
- // So you can pass any parameters supported by the search endpoint below.
- // queryBy is required.
- additionalSearchParameters: {
- query_by: "title",
- },
- });
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
- const searchClient = typesenseInstantsearchAdapter.searchClient as unknown as SearchClient;
+function DefaultRefinementList({
+ attribute,
+ placeholder,
+}: {
+ attribute: string;
+ placeholder: string;
+}) {
+ return (
+
+ );
+}
- function DefaultRefinementList({
- attribute,
- attributeName,
- }: {
- attribute: string;
- attributeName: string;
- }) {
- return (
-
- );
- }
+export function InstantSearch() {
+ const t = useTranslations("SearchPage");
return (
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
-
-
-
+
+
+