Do not show modals to non-multitenant users (#4256)

This commit is contained in:
pablonyx 2025-03-11 11:53:13 -07:00 committed by GitHub
parent 59a388ce0a
commit f94d335d12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 (
<>