|
1 |
| -"use client"; |
2 |
| - |
3 |
| -import { useSession } from "next-auth/react"; |
| 1 | +import { getTranslate } from "app/_utils"; |
4 | 2 |
|
5 | 3 | import Shell from "@calcom/features/shell/Shell";
|
6 |
| -import { UpgradeTip } from "@calcom/features/tips"; |
7 |
| -import { WEBAPP_URL } from "@calcom/lib/constants"; |
8 |
| -import { useLocale } from "@calcom/lib/hooks/useLocale"; |
9 |
| -import { Button, ButtonGroup } from "@calcom/ui"; |
10 |
| -import { Icon } from "@calcom/ui"; |
11 |
| - |
12 |
| -export default function InsightsLayout({ children }: { children: React.ReactNode }) { |
13 |
| - const { t } = useLocale(); |
14 |
| - const session = useSession(); |
15 | 4 |
|
16 |
| - const features = [ |
17 |
| - { |
18 |
| - icon: <Icon name="users" className="h-5 w-5" />, |
19 |
| - title: t("view_bookings_across"), |
20 |
| - description: t("view_bookings_across_description"), |
21 |
| - }, |
22 |
| - { |
23 |
| - icon: <Icon name="refresh-ccw" className="h-5 w-5" />, |
24 |
| - title: t("identify_booking_trends"), |
25 |
| - description: t("identify_booking_trends_description"), |
26 |
| - }, |
27 |
| - { |
28 |
| - icon: <Icon name="user-plus" className="h-5 w-5" />, |
29 |
| - title: t("spot_popular_event_types"), |
30 |
| - description: t("spot_popular_event_types_description"), |
31 |
| - }, |
32 |
| - ]; |
| 5 | +import UpgradeTipWrapper from "./UpgradeTipWrapper"; |
33 | 6 |
|
| 7 | +export default async function InsightsLayout({ children }: { children: React.ReactNode }) { |
| 8 | + const t = await getTranslate(); |
34 | 9 | return (
|
35 | 10 | <div>
|
36 |
| - <Shell |
37 |
| - withoutMain={false} |
38 |
| - withoutSeo={true} |
39 |
| - heading={t("insights")} |
40 |
| - subtitle={t("insights_subtitle")} |
41 |
| - title={t("insights")} |
42 |
| - description={t("insights_subtitle")}> |
43 |
| - <UpgradeTip |
44 |
| - plan="team" |
45 |
| - title={t("make_informed_decisions")} |
46 |
| - description={t("make_informed_decisions_description")} |
47 |
| - features={features} |
48 |
| - background="/tips/insights" |
49 |
| - buttons={ |
50 |
| - <div className="space-y-2 rtl:space-x-reverse sm:space-x-2"> |
51 |
| - <ButtonGroup> |
52 |
| - <Button color="primary" href={`${WEBAPP_URL}/settings/teams/new`}> |
53 |
| - {t("create_team")} |
54 |
| - </Button> |
55 |
| - <Button color="minimal" href="https://go.cal.com/insights" target="_blank"> |
56 |
| - {t("learn_more")} |
57 |
| - </Button> |
58 |
| - </ButtonGroup> |
59 |
| - </div> |
60 |
| - }> |
61 |
| - {!session.data?.user ? null : children} |
62 |
| - </UpgradeTip> |
| 11 | + <Shell withoutMain={false} withoutSeo={true} heading={t("insights")} subtitle={t("insights_subtitle")}> |
| 12 | + <UpgradeTipWrapper>{children}</UpgradeTipWrapper> |
63 | 13 | </Shell>
|
64 | 14 | </div>
|
65 | 15 | );
|
|
0 commit comments