diff --git a/site/package-lock.json b/site/package-lock.json index 32d888a3b8..18622e346a 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -21,6 +21,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-player": "^2.16.0", + "reodotdev": "^1.0.0", "stable": "^0.1.8" }, "devDependencies": { @@ -14697,6 +14698,11 @@ "entities": "^2.0.0" } }, + "node_modules/reodotdev": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/reodotdev/-/reodotdev-1.0.0.tgz", + "integrity": "sha512-wXe1vJucZjrhQL0SxOL9EvmJrtbMCIEGMdZX5lj/57n2T3UhBHZsAcM5TQASJ0T6ZBbrETRnMhH33bsbJeRO6Q==" + }, "node_modules/repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", diff --git a/site/package.json b/site/package.json index ffe02de339..83c37e34b7 100644 --- a/site/package.json +++ b/site/package.json @@ -27,6 +27,7 @@ "prism-react-renderer": "^2.3.1", "react": "^18.2.0", "react-dom": "^18.2.0", + "reodotdev": "^1.0.0", "react-player": "^2.16.0", "stable": "^0.1.8" }, diff --git a/site/src/theme/Root.js b/site/src/theme/Root.js index 3a6717cd4f..4b66c02862 100644 --- a/site/src/theme/Root.js +++ b/site/src/theme/Root.js @@ -1,12 +1,24 @@ import React, { useEffect } from 'react'; +import { loadReoScript } from 'reodotdev' const MESSAGE_TYPE = 'estuary.docs.hideNavBar'; - const BODY_CLASS = 'running-in-iframe'; +const REO_DOT_DEV_ID = "a2955ffcdd9029c"; // Default implementation, that you can customize export default function Root({ children }) { useEffect(() => { + // Load in reo.dev scripts + const reoPromise = loadReoScript({ + clientID: REO_DOT_DEV_ID + }); + reoPromise.then(Reo => { + Reo.init({ + clientID: REO_DOT_DEV_ID + }); + }) + + // Listen for messaging from dashboard for styling light/dark mode const handleMessageListener = (event) => { if (event.origin === 'http://localhost:3000' || event.origin === 'https://dashboard.estuary.dev') { if (event.data?.type === MESSAGE_TYPE) {