Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Fix decline card modal not closing on the billing page

Carlos Monastyrskicd87e402c055
diff --git a/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx b/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx
index 4cef73f46a..a51147d75d 100644
--- a/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx
+++ b/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx
@@ -170,7 +170,7 @@ export const Navbar = () => {
const [isOrgSelectOpen, setIsOrgSelectOpen] = useState(false);
const location = useLocation();
- const isBillingPage = location.pathname === "/organization/billing";
+ const isBillingPage = /^\/organization[s]?\/[^/]+\/billing$/.test(location.pathname);
const isModalIntrusive = Boolean(!isBillingPage && isCardDeclinedMoreThan30Days);