From f94d335d129c015845e4a63990f0ae7f6db9968f Mon Sep 17 00:00:00 2001 From: pablonyx Date: Tue, 11 Mar 2025 11:53:13 -0700 Subject: [PATCH] Do not show modals to non-multitenant users (#4256) --- web/src/components/context/ModalContext.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/components/context/ModalContext.tsx b/web/src/components/context/ModalContext.tsx index 407b0feec..b73903994 100644 --- a/web/src/components/context/ModalContext.tsx +++ b/web/src/components/context/ModalContext.tsx @@ -4,6 +4,7 @@ import React, { createContext, useContext, useState, useCallback } from "react"; import { NewTeamModal } from "../modals/NewTeamModal"; import NewTenantModal from "../modals/NewTenantModal"; import { User, NewTenantInfo } from "@/lib/types"; +import { NEXT_PUBLIC_CLOUD_ENABLED } from "@/lib/constants"; type ModalContextType = { showNewTeamModal: boolean; @@ -48,7 +49,7 @@ export const ModalProvider: React.FC<{ // Render all application-wide modals const renderModals = () => { - if (!user) return null; + if (!user || !NEXT_PUBLIC_CLOUD_ENABLED) return null; return ( <>