chore: Sync package version v1.15.0

This commit is contained in:
Bot DocuBook
2025-08-05 19:19:43 +00:00
parent e2cc6eb7f2
commit e2b24ce19e
8 changed files with 244 additions and 23 deletions

33
components/DocSearch.tsx Normal file
View File

@@ -0,0 +1,33 @@
"use client";
import React from "react";
import { DocSearch } from "@docsearch/react";
import "@docsearch/css";
export default function DocSearchComponent() {
const appId = process.env.NEXT_PUBLIC_ALGOLIA_DOCSEARCH_APP_ID;
const apiKey = process.env.NEXT_PUBLIC_ALGOLIA_DOCSEARCH_API_KEY;
const indexName = process.env.NEXT_PUBLIC_ALGOLIA_DOCSEARCH_INDEX_NAME;
if (!appId || !apiKey || !indexName) {
console.error(
"DocSearch credentials are not set in the environment variables."
);
return (
<button className="text-sm text-muted-foreground" disabled>
Search... (misconfigured)
</button>
);
}
return (
<div className="docsearch">
<DocSearch
appId={appId}
apiKey={apiKey}
indexName={indexName}
placeholder="Type something to search..."
/>
</div>
);
}