diff --git a/apps/deploy-web/src/hooks/useHasCreditCardBanner.ts b/apps/deploy-web/src/hooks/useHasCreditCardBanner.ts index 01f42b118..30e69871e 100644 --- a/apps/deploy-web/src/hooks/useHasCreditCardBanner.ts +++ b/apps/deploy-web/src/hooks/useHasCreditCardBanner.ts @@ -3,6 +3,8 @@ import { useEffect, useMemo, useState } from "react"; import { browserEnvConfig } from "@src/config/browser-env.config"; import { useWallet } from "@src/context/WalletProvider"; import { useUser } from "./useUser"; +import { useAtom } from "jotai"; +import walletStore from "@src/store/walletStore"; const withBilling = browserEnvConfig.NEXT_PUBLIC_BILLING_ENABLED; @@ -11,8 +13,9 @@ export function useHasCreditCardBanner() { const [isBannerVisible, setIsBannerVisible] = useState(false); const [isInitialized, setIsInitialized] = useState(false); const { hasManagedWallet, isWalletLoading } = useWallet(); + const [isSignedInWithTrial] = useAtom(walletStore.isSignedInWithTrial); const shouldShowBanner = useMemo( - () => isInitialized && withBilling && !hasManagedWallet && !isWalletLoading, + () => isInitialized && withBilling && !hasManagedWallet && !isWalletLoading && !isSignedInWithTrial, [isInitialized, hasManagedWallet, isWalletLoading] );