From 5a11d9f3dfb45d1f146ec8577efef49b3889deb8 Mon Sep 17 00:00:00 2001 From: Ketan Sharma Date: Thu, 19 Sep 2024 20:32:00 +0530 Subject: [PATCH] [WEB-2489] fix: overlapping issues for trial banner (#1178) * fix overplaping issues for trial banner * fix css --- web/app/layout.tsx | 2 -- .../license/banner/free-trial-banner.tsx | 14 ++++---------- 2 files changed, 4 insertions(+), 12 deletions(-) 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(() => {
- +
); });