cal.pub0.org/packages/features/ee/support/lib/intercom/useIntercom.ts

13 lines
316 B
TypeScript
Raw Normal View History

import noop from "lodash/noop";
import { useIntercom as _useIntercom } from "react-use-intercom";
export const useIntercom =
typeof window !== "undefined" && !!process.env.NEXT_PUBLIC_INTERCOM_APP_ID
? _useIntercom
: () => ({
boot: noop,
show: noop,
});
export default useIntercom;