From 2dba1558e621112fbd07f4e46968eccfb707c95c Mon Sep 17 00:00:00 2001 From: Nikhil Nandagopal Date: Sat, 10 Jul 2021 15:31:53 +0530 Subject: [PATCH] removed chat with us for self hosting since we killed github discussions (#5767) --- .../appsmith/help/DocumentationSearch.tsx | 18 +++++++----------- .../GlobalSearch/useRecentEntities.tsx | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/app/client/src/components/designSystems/appsmith/help/DocumentationSearch.tsx b/app/client/src/components/designSystems/appsmith/help/DocumentationSearch.tsx index 89fe057084..2326a4aafc 100644 --- a/app/client/src/components/designSystems/appsmith/help/DocumentationSearch.tsx +++ b/app/client/src/components/designSystems/appsmith/help/DocumentationSearch.tsx @@ -320,7 +320,7 @@ type HelpItem = { icon: React.ReactNode; }; -const HELP_MENU_ITEMS: HelpItem[] = [ +let HELP_MENU_ITEMS: HelpItem[] = [ { icon: , label: "Documentation", @@ -331,24 +331,20 @@ const HELP_MENU_ITEMS: HelpItem[] = [ label: "Report a bug", link: "https://github.com/appsmithorg/appsmith/issues/new/choose", }, - { - icon: , - label: "Chat with us", - link: "https://github.com/appsmithorg/appsmith/discussions", - }, { icon: , label: "Join our Discord", link: "https://discord.gg/rBTTVJp", }, -]; - -if (cloudHosting) { - HELP_MENU_ITEMS[2] = { + { icon: , label: "Chat with us", id: "intercom-trigger", - }; + }, +]; + +if (!cloudHosting) { + HELP_MENU_ITEMS = HELP_MENU_ITEMS.slice(0, -1); } class DocumentationSearch extends React.Component { diff --git a/app/client/src/components/editorComponents/GlobalSearch/useRecentEntities.tsx b/app/client/src/components/editorComponents/GlobalSearch/useRecentEntities.tsx index 7943051a54..347bc8ee58 100644 --- a/app/client/src/components/editorComponents/GlobalSearch/useRecentEntities.tsx +++ b/app/client/src/components/editorComponents/GlobalSearch/useRecentEntities.tsx @@ -6,7 +6,7 @@ import { SEARCH_ITEM_TYPES } from "./utils"; import { get } from "lodash"; const recentEntitiesSelector = (state: AppState) => - state.ui.globalSearch.recentEntities; + state.ui.globalSearch.recentEntities || []; const useResentEntities = () => { const widgetsMap = useSelector(getAllWidgetsMap);