mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* Icon and IconName * Button and ButtonGroup * UserAvatar * AvatarGroup * Avatar * WizardLayout * Dialogs * EmptyScreen * showToast and TextField * Editor * Skeleton * Skeleton * TopBanner and showToast * Button again * more * perf: Remove app-store reference from @calcom/ui * more * Fixing types * Icon * Fixed casing * dropdown * more * Select * more * Badge * List * more * Divider * more * fix * fix type check * refactor * fix * fix * fix * fix * fix * fix * fix * fix type check * fix * fix * fix * fix * more * more * more * more * add index file to components/command * fix * fix * fix * fix imports * fix * fix * fix * fix * fix * fix * fix * fix build errors * fix build errors * fix --------- Co-authored-by: Keith Williams <[email protected]>
56 lines
1.8 KiB
TypeScript
56 lines
1.8 KiB
TypeScript
"use client";
|
|
|
|
import { useSession } from "next-auth/react";
|
|
|
|
import { UpgradeTip } from "@calcom/features/tips";
|
|
import { WEBAPP_URL } from "@calcom/lib/constants";
|
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
|
import { Button } from "@calcom/ui/components/button";
|
|
import { ButtonGroup } from "@calcom/ui/components/buttonGroup";
|
|
import { Icon } from "@calcom/ui/components/icon";
|
|
|
|
export default function UpgradeTipWrapper({ children }: { children: React.ReactNode }) {
|
|
const { t } = useLocale();
|
|
const session = useSession();
|
|
const features = [
|
|
{
|
|
icon: <Icon name="users" className="h-5 w-5" />,
|
|
title: t("view_bookings_across"),
|
|
description: t("view_bookings_across_description"),
|
|
},
|
|
{
|
|
icon: <Icon name="refresh-ccw" className="h-5 w-5" />,
|
|
title: t("identify_booking_trends"),
|
|
description: t("identify_booking_trends_description"),
|
|
},
|
|
{
|
|
icon: <Icon name="user-plus" className="h-5 w-5" />,
|
|
title: t("spot_popular_event_types"),
|
|
description: t("spot_popular_event_types_description"),
|
|
},
|
|
];
|
|
|
|
return (
|
|
<UpgradeTip
|
|
plan="team"
|
|
title={t("make_informed_decisions")}
|
|
description={t("make_informed_decisions_description")}
|
|
features={features}
|
|
background="/tips/insights"
|
|
buttons={
|
|
<div className="space-y-2 rtl:space-x-reverse sm:space-x-2">
|
|
<ButtonGroup>
|
|
<Button color="primary" href={`${WEBAPP_URL}/settings/teams/new`}>
|
|
{t("create_team")}
|
|
</Button>
|
|
<Button color="minimal" href="https://go.cal.com/insights" target="_blank">
|
|
{t("learn_more")}
|
|
</Button>
|
|
</ButtonGroup>
|
|
</div>
|
|
}>
|
|
{!session.data?.user ? null : children}
|
|
</UpgradeTip>
|
|
);
|
|
}
|