Skip to content

Commit

Permalink
fix: install servicebell & add condition for markprompt (datahub-proj…
Browse files Browse the repository at this point in the history
  • Loading branch information
yoonhyejin authored Nov 4, 2024
1 parent 00a2751 commit 95f361a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@octokit/plugin-throttling": "^3.5.1",
"@octokit/rest": "^18.6.2",
"@radix-ui/react-visually-hidden": "^1.0.2",
"@servicebell/widget": "^0.1.6",
"@supabase/supabase-js": "^2.33.1",
"@swc/core": "^1.4.2",
"antd": "^5.0.7",
Expand Down
9 changes: 8 additions & 1 deletion docs-website/src/pages/cloud/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useEffect, useState } from "react";
import Layout from "@theme/Layout";
import Link from "@docusaurus/Link";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
Expand All @@ -10,8 +10,11 @@ import UnifiedTabs from "./UnifiedTabs";
import FeatureCards from "./FeatureCards";
import Hero from "./Hero";
import DemoForm from "./DemoForm";
import ServiceBell from "@servicebell/widget";
import DemoFormModal from "./DemoFormModal";

const SERVICE_BELL_ID = "00892146e5bc46d98d55ecc2b2fa67e2";

function Home() {
const context = useDocusaurusContext();
const { siteConfig = {} } = context;
Expand All @@ -24,6 +27,10 @@ function Home() {
window.location.replace("/docs");
}

useEffect(() => {
ServiceBell("init", SERVICE_BELL_ID, { hidden: false });
}, []);

return !siteConfig.customFields.isSaas ? (
<Layout
title={'DataHub Cloud - Unify Data Observability, Governance and Discovery'}
Expand Down
6 changes: 5 additions & 1 deletion docs-website/src/theme/Footer/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import React from "react";
import { useLocation } from "react-router-dom"; // Import useLocation from react-router-dom
import Footer from "@theme-original/Footer";
import MarkpromptHelp from "../../components/MarkpromptHelp";

export default function FooterWrapper(props) {
const location = useLocation(); // Get the current location
const isDocsPage = location.pathname.startsWith("/docs"); // Check if the path starts with /docs

return (
<>
<MarkpromptHelp />
{isDocsPage && <MarkpromptHelp />}
<Footer {...props} />
</>
);
Expand Down
5 changes: 5 additions & 0 deletions docs-website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2843,6 +2843,11 @@
rc-resize-observer "^1.3.1"
rc-util "^5.38.0"

"@servicebell/widget@^0.1.6":
version "0.1.6"
resolved "https://registry.yarnpkg.com/@servicebell/widget/-/widget-0.1.6.tgz#04672a7e7b14ff7025ec83fd740373345c359d74"
integrity sha512-Kh21FAETJlk32MRXHGYKxFTWLbbLlgLX3lKYH/02KHaQGIPRdHh/Ok7DiRc+/6f/OTQq3x3ady7e4o9weV5yQg==

"@sideway/address@^4.1.5":
version "4.1.5"
resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.5.tgz#4bc149a0076623ced99ca8208ba780d65a99b9d5"
Expand Down

0 comments on commit 95f361a

Please sign in to comment.