feat: add upgrade banners for teams and organizations (#27650)

This commit is contained in:
Eunjae Lee authored and GitHub committed 2026-03-05 18:19:01 +09:00
1 parent c197de147a
commit b7340f7151
74 files changed
+1834 -500

No files matched your search

+2 -2
View File
@@ -206,10 +206,10 @@ function MainContainer({
...props
}: LayoutProps) {
return (
<main className="bg-default relative z-0 flex-1 pb-8 focus:outline-none">
<main className="bg-default relative z-0 flex-1 focus:outline-none">
{/* show top navigation for md and smaller (tablet and phones) */}
{TopNavContainerProp}
<div className="max-w-full p-2 sm:py-4 lg:px-6">
<div className="max-w-full p-2 sm:p-4 lg:p-6">
<ErrorBoundary>
{!props.withoutMain ? <ShellMain {...props}>{props.children}</ShellMain> : props.children}
</ErrorBoundary>
@@ -20,8 +20,7 @@ import { NavigationItem, MobileNavigationItem, MobileNavigationMoreItem } from "
export const MORE_SEPARATOR_NAME = "more";
const getNavigationItems = (
orgBranding: OrganizationBranding,
hasAllInsightsAccess: boolean
orgBranding: OrganizationBranding
): NavigationItemType[] => [
{
name: "event_types_page_title",
@@ -112,8 +111,7 @@ const getNavigationItems = (
icon: "chart-bar",
isCurrent: ({ pathname: path, item }) => path?.startsWith(item.href) ?? false,
moreOnMobile: true,
child: hasAllInsightsAccess
? [
child: [
{
name: "bookings",
href: "/insights",
@@ -141,14 +139,6 @@ const getNavigationItems = (
isCurrent: ({ pathname: path }) => path?.startsWith("/insights/wrong-routing") ?? false,
},
]
: [
{
name: "call_history",
href: "/insights/call-history",
// icon: "phone",
isCurrent: ({ pathname: path }) => path?.startsWith("/insights/call-history") ?? false,
},
],
},
];
@@ -206,9 +196,8 @@ const useNavigationItems = (isPlatformNavigation = false) => {
const orgBranding = useOrgBranding();
const { hasPaidPlan, isPending } = useHasPaidPlan();
return useMemo(() => {
const hasAllInsightsAccess = !isPending && !!hasPaidPlan;
const items = !isPlatformNavigation
? getNavigationItems(orgBranding, hasAllInsightsAccess)
? getNavigationItems(orgBranding)
: platformNavigationItems;
const desktopNavigationItems = items.filter((item) => item.name !== MORE_SEPARATOR_NAME);