From 03ff80b301f202c984cb833459576ac7239e4400 Mon Sep 17 00:00:00 2001 From: Iaroslav Gryshaiev Date: Wed, 4 Dec 2024 15:00:05 +0000 Subject: [PATCH] refactor(billing): keep banner deps in a single component (#515) --- .../src/components/layout/Layout.tsx | 25 ++++++++----------- apps/deploy-web/src/components/layout/Nav.tsx | 13 ++++------ .../src/components/layout/Sidebar.tsx | 19 ++++++++------ .../src/hooks/useHasCreditCardBanner.ts | 8 ++++-- 4 files changed, 33 insertions(+), 32 deletions(-) diff --git a/apps/deploy-web/src/components/layout/Layout.tsx b/apps/deploy-web/src/components/layout/Layout.tsx index 15edbabc1..90ecf2b0d 100644 --- a/apps/deploy-web/src/components/layout/Layout.tsx +++ b/apps/deploy-web/src/components/layout/Layout.tsx @@ -87,33 +87,30 @@ const LayoutApp: React.FunctionComponent = ({ children, isLoading, isUsin }; return ( -
+
{/* Banner for Free Trial and Credit Card payments */} {hasCreditCardBanner && ( <> -
+
Credit Card payments are now available! {!hasManagedWallet && }
- )} -
+
-