2023-01-14 00:48:19 +00:00
|
|
|
import Link from "next/link";
|
|
|
|
|
2023-01-31 19:10:21 +00:00
|
|
|
import { useHasPaidPlan } from "@calcom/lib/hooks/useHasPaidPlan";
|
2023-01-14 00:48:19 +00:00
|
|
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
|
|
|
|
|
|
|
import { Tooltip } from "../tooltip";
|
|
|
|
import { Badge } from "./Badge";
|
|
|
|
|
|
|
|
export const UpgradeTeamsBadge = function UpgradeTeamsBadge() {
|
|
|
|
const { t } = useLocale();
|
2023-01-31 19:10:21 +00:00
|
|
|
const { hasPaidPlan } = useHasPaidPlan();
|
2023-01-23 09:58:41 +00:00
|
|
|
|
2023-01-31 19:10:21 +00:00
|
|
|
if (hasPaidPlan) return null;
|
2023-01-14 00:48:19 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Tooltip content={t("upgrade_to_enable_feature")}>
|
|
|
|
<Link href="/teams">
|
|
|
|
<Badge variant="gray">{t("upgrade")}</Badge>
|
|
|
|
</Link>
|
|
|
|
</Tooltip>
|
|
|
|
);
|
|
|
|
};
|