File tree Expand file tree Collapse file tree 3 files changed +2165
-27
lines changed Expand file tree Collapse file tree 3 files changed +2165
-27
lines changed Original file line number Diff line number Diff line change 2020 "dependencies" : {
2121 "@docsearch/css" : " 3" ,
2222 "@algolia/client-search" : " ^5.23.4" ,
23+ "@cookbookdev/docsbot" : " ^4.25.8" ,
2324 "@docusaurus/core" : " ^3.7.0" ,
2425 "@docusaurus/plugin-content-docs" : " ^3.7.0" ,
2526 "@docusaurus/plugin-google-gtag" : " ^3.7.0" ,
6566 "engines" : {
6667 "node" : " >=18.0"
6768 }
68- }
69+ }
Original file line number Diff line number Diff line change 1+ import React from "react" ;
2+ import SearchBar from "@theme-original/SearchBar" ;
3+ import AskCookbook from "@cookbookdev/docsbot/react" ;
4+ import BrowserOnly from "@docusaurus/BrowserOnly" ;
5+
6+ /** It's a public API key, so it's safe to expose it here */
7+ const COOKBOOK_PUBLIC_API_KEY =
8+ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2N2ExNjZlN2Y4MTAzY2QxMjg4NDQ0MGMiLCJpYXQiOjE3Mzg2MzA4ODcsImV4cCI6MjA1NDIwNjg4N30.MoUziaM2dGeFiqa-L1xpqtZDh6Fbo_6invv8ah1DKSU" ;
9+
10+ export default function SearchBarWrapper ( props ) {
11+ return (
12+ < >
13+ < SearchBar { ...props } />
14+ < BrowserOnly >
15+ { ( ) => < AskCookbook apiKey = { COOKBOOK_PUBLIC_API_KEY } /> }
16+ </ BrowserOnly >
17+ </ >
18+ ) ;
19+ }
You can’t perform that action at this time.
0 commit comments