[WEB-2103]: chore: Intercom integration (#5295)

* fix: intecom sdk integration

* dev: integrated intercom in god-mode

* dev: intercom default value true

* dev: updated intercom keys in intercom provider

* chore: added restriction values

---------

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
guru_sainath 2024-08-05 13:37:11 +05:30 committed by GitHub
parent 34820eec7a
commit 0619f1b6d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 221 additions and 40 deletions

View file

@ -10,7 +10,7 @@ import { DiscordIcon, GithubIcon, Tooltip } from "@plane/ui";
// helpers
import { cn } from "@/helpers/common.helper";
// hooks
import { useAppTheme, useCommandPalette } from "@/hooks/store";
import { useAppTheme, useCommandPalette, useInstance } from "@/hooks/store";
import useOutsideClickDetector from "@/hooks/use-outside-click-detector";
import { usePlatformOS } from "@/hooks/use-platform-os";
// components
@ -44,6 +44,7 @@ export const SidebarHelpSection: React.FC<WorkspaceHelpSectionProps> = observer(
const { sidebarCollapsed, toggleSidebar } = useAppTheme();
const { toggleShortcutModal } = useCommandPalette();
const { isMobile } = usePlatformOS();
const { config } = useInstance();
// states
const [isNeedHelpOpen, setIsNeedHelpOpen] = useState(false);
// refs
@ -148,7 +149,7 @@ export const SidebarHelpSection: React.FC<WorkspaceHelpSectionProps> = observer(
</span>
</Link>
))}
{process.env.NEXT_PUBLIC_CRISP_ID && (
{config?.intercom_app_id && config?.is_intercom_enabled && (
<button
type="button"
onClick={handleCrispWindowShow}