Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Cookbook Onboard (AI Assistant) #1689

Open
wants to merge 1 commit into
base: stage
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"node-html-markdown": "^1.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-gtm-module": "^2.0.11"
"react-gtm-module": "^2.0.11",
"@cookbookdev/docsbot": "^4.21.5"
},
"devDependencies": {
"@svgr/webpack": "^6.5.1",
Expand Down
9 changes: 8 additions & 1 deletion pages/_app.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import "styles/global.css";
import "nextra-theme-docs/style.css";
import { useGtm } from "hooks";
import { AskCookbook } from "components";

export default function App({ Component, pageProps }) {
useGtm(pageProps);
return <Component {...pageProps} />
return (
<>
<Component {...pageProps} />
<AskCookbook />
</>
);
}

12 changes: 12 additions & 0 deletions src/components/AskCookbook.jsx
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-fixed'), { 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.eyJzdWIiOiI2NmE5OGQ2NGNhMjA3NDg1NDU1OWFlNjMiLCJpYXQiOjE3MjIzODc4MTIsImV4cCI6MjAzNzk2MzgxMn0.PjwUYZ6_mvOkDD3RtI51UjwxIL8E93pPoMcVatUi2ik';

export const AskCookbook = () => {
return (
<BaseAskCookbook apiKey={COOKBOOK_PUBLIC_API_KEY} />
);
};
1 change: 1 addition & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export * from './Callout';
export * from './gtm';
export * from './OpenUrl';
export * from './UnstakeETHTimer';
export * from './AskCookbook';
Loading