* Update all Yarn dependencies (2022-05-16) * Upgrade dependencies * Removes deprecated packages * Upgrades deps * Updates submodules * Update yarn.lock * Linting * Linting * Update website * Build fixes * TODO: fix this * Module resolving * Type fixes * Intercom fixes on SSG * Fixes infinite loop * Upgrades to React 18 * Type fixes * Locks node version to 14 * Upgrades daily-js * Readds missing types * Upgrades playwright * Noop when intercom is not installed * Update website * Removed yarn.lock in favor of monorepo Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com>
35 lines
989 B
TypeScript
35 lines
989 B
TypeScript
import { ChatAltIcon } from "@heroicons/react/solid";
|
|
|
|
import { DropdownMenuItem } from "@calcom/ui/Dropdown";
|
|
|
|
import classNames from "@lib/classNames";
|
|
import { useLocale } from "@lib/hooks/useLocale";
|
|
|
|
import { useIntercom } from "./useIntercom";
|
|
|
|
export default function IntercomMenuItem() {
|
|
const { t } = useLocale();
|
|
const { boot, show } = useIntercom();
|
|
if (!process.env.NEXT_PUBLIC_INTERCOM_APP_ID) return null;
|
|
else
|
|
return (
|
|
<DropdownMenuItem>
|
|
<button
|
|
onClick={() => {
|
|
boot();
|
|
show();
|
|
}}
|
|
className="flex w-full px-4 py-2 text-sm font-medium text-neutral-700 hover:bg-gray-100 hover:text-gray-900">
|
|
<ChatAltIcon
|
|
className={classNames(
|
|
"text-neutral-400 group-hover:text-neutral-500",
|
|
"h-5 w-5 flex-shrink-0 ltr:mr-3"
|
|
)}
|
|
aria-hidden="true"
|
|
/>
|
|
{t("help")}
|
|
</button>
|
|
</DropdownMenuItem>
|
|
);
|
|
}
|