mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-17 13:22:42 +01:00
Do not show modals to non-multitenant users (#4256)
This commit is contained in:
parent
59a388ce0a
commit
f94d335d12
@ -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 (
|
||||
<>
|
||||
|
Loading…
x
Reference in New Issue
Block a user