Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ask-cookbook.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Solves the following error: "Cannot find module ... or its corresponding type declarations. There are types at ..., but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'. [2307]"
declare module "@cookbookdev/docsbot/react" {
export { default } from "@cookbookdev/docsbot/dist/react/index.d.ts";
}
12 changes: 12 additions & 0 deletions components/AskCookbook.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import dynamic from "next/dynamic";
const BaseAskCookbook = dynamic(() => import("@cookbookdev/docsbot/react"), {
ssr: false,
});

/** It's going to be exposed in HTTP requests anyway so it's fine to just hardcode it here */
const COOKBOOK_PUBLIC_API_KEY =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2NmE5YTdhZmNhMjA3NDg1NDU1YTIyMDYiLCJpYXQiOjE3MjIzOTQ1NDMsImV4cCI6MjAzNzk3MDU0M30.9gU7TfUlrFJcruL89tm4YPauUmxB6iRJ27mhaNW8fdc";

export const AskCookbook = () => {
return <BaseAskCookbook apiKey={COOKBOOK_PUBLIC_API_KEY} />;
};
Loading
Loading