diff --git a/web/app/layout.tsx b/web/app/layout.tsx index 4a56d0adc0..7058784d9c 100644 --- a/web/app/layout.tsx +++ b/web/app/layout.tsx @@ -85,10 +85,8 @@ export default function RootLayout({ children }: { children: React.ReactNode }) "app-container" )} > -
{/* free trial banner */} -
{children}
diff --git a/web/ee/components/license/banner/free-trial-banner.tsx b/web/ee/components/license/banner/free-trial-banner.tsx index b4351476d6..ebac2aedca 100644 --- a/web/ee/components/license/banner/free-trial-banner.tsx +++ b/web/ee/components/license/banner/free-trial-banner.tsx @@ -20,9 +20,7 @@ export const FreeTrialBanner: FC = observer(() => { const { config } = useInstance(); const { allowPermissions } = useUserPermissions(); const { currentWorkspace } = useWorkspace(); - const { currentWorkspaceSubscribedPlanDetail: subscriptionDetail } = useWorkspaceSubscription(); - // states - const [pricingModalOpen, setPricingModalOpen] = useState(false); + const { currentWorkspaceSubscribedPlanDetail: subscriptionDetail, togglePaidPlanModal } = useWorkspaceSubscription(); // derived values const canPerformWorkspaceAdminActions = allowPermissions([EUserPermissions.ADMIN], EUserPermissionsLevel.WORKSPACE); @@ -34,10 +32,7 @@ export const FreeTrialBanner: FC = observer(() => { if (!subscriptionDetail.show_trial_banner) return <>; return ( - <> - {/* This modal is intentionally placed inside the condition to avoid unnecessary calls to list product endpoint. */} - setPricingModalOpen(false)} /> - +
@@ -48,7 +43,7 @@ export const FreeTrialBanner: FC = observer(() => { .
- @@ -56,7 +51,6 @@ export const FreeTrialBanner: FC = observer(() => { href="https://cal.com/plane/" target="_blank" className={cn(getButtonStyling("neutral-primary", "sm"), "py-1")} - onClick={() => setPricingModalOpen(true)} > Get 1:1 help @@ -64,6 +58,6 @@ export const FreeTrialBanner: FC = observer(() => {
- +
); });