feat: always show intercom on desktop by default (hidden on mobile) (#14423)
* feat: always show intercom on desktop by default (hidden on mobile) * Revert "feat: always show intercom on desktop by default (hidden on mobile)" This reverts commit d14a7b0808a5c3b7f15de75d3a422c4ec5e14f2b. * feat: always show intercom on desktop by default (hidden on mobile) * fix: type error * refactor * saved showIntercom in localstorage instead of DB --------- Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
1 parent
0c67f4940a
commit
f010279303
7 files changed
+106
-64
No files matched your search
@@ -9,7 +9,6 @@ import { memo, useEffect, useState } from "react";
|
||||
import { z } from "zod";
|
||||
|
||||
import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider";
|
||||
import useIntercom from "@calcom/features/ee/support/lib/intercom/useIntercom";
|
||||
import { EventTypeEmbedButton, EventTypeEmbedDialog } from "@calcom/features/embed/EventTypeEmbed";
|
||||
import { EventTypeDescription } from "@calcom/features/eventtypes/components";
|
||||
import CreateEventTypeDialog from "@calcom/features/eventtypes/components/CreateEventTypeDialog";
|
||||
@@ -950,8 +949,6 @@ const EventTypesPage: React.FC & {
|
||||
getLayout?: AppProps["Component"]["getLayout"];
|
||||
} = () => {
|
||||
const { t } = useLocale();
|
||||
const searchParams = useCompatSearchParams();
|
||||
const { open } = useIntercom();
|
||||
const { data: user } = useMeQuery();
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const [showProfileBanner, setShowProfileBanner] = useState(false);
|
||||
@@ -966,13 +963,6 @@ const EventTypesPage: React.FC & {
|
||||
staleTime: 1 * 60 * 60 * 1000,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (searchParams?.get("openIntercom") === "true") {
|
||||
open();
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setShowProfileBanner(
|
||||
!!orgBranding && !document.cookie.includes("calcom-profile-banner=1") && !user?.completedOnboarding
|
||||
|
||||
@@ -2403,5 +2403,7 @@
|
||||
"unreviewed": "Unreviewed",
|
||||
"rating_url_info":"The URL for Rating Feedback Form",
|
||||
"no_show_url_info":"The URL for No Show Feedback",
|
||||
"no_support_needed":"No Support Needed?",
|
||||
"hide_support":"Hide Support",
|
||||
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
|
||||
}
|
||||
Reference in new issue
Block a user