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

Change Mendable AI widget asset url #1575

Merged
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
14 changes: 8 additions & 6 deletions src/components/MendableAIWidget/MendableAIWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import { useEffect } from "react";
// import spectrocloudLogo from "@site/static/assets/spectrocloud-logo.png";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
// import spectrologoUser from "@site/static/assets/spectrocloud-logo-black.svg";
import useBaseUrl from "@docusaurus/useBaseUrl";

export const MENDABLE_SCRIPT_URL = "https://unpkg.com/@mendable/search@0.0.158/dist/umd/mendable-bundle.min.js";
export const MENDABLE_SCRIPT_URL =
"https://unpkg.com/@mendable/search@0.0.158/dist/umd/mendable-bundle.min.js";

export default function MendableAIWidget() {
const {
siteConfig: { customFields },
} = useDocusaurusContext();

const logoUrl = useBaseUrl("/spectrocloud-logo.png");
const botUrl = useBaseUrl("/spectrocloud-logo-black.svg");

useEffect(() => {
const script = document.createElement("script");
script.src = MENDABLE_SCRIPT_URL;
Expand All @@ -26,9 +29,8 @@ export default function MendableAIWidget() {
type: "floatingButton",
dialogPlaceholder: "What is Palette?",
cmdShortcutKey: "l",
welcomeMessage:"Ask my anything about Palette",
// icon: spectrocloudLogo as string,
// botIcon: spectrologoUser,
icon: logoUrl,
botIcon: botUrl,
isPinnable: true,
floatingButtonStyle: {
color: "#FFFFFF",
Expand Down
Loading