mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-08-09 06:22:18 +02:00
Do not show modals to non-multitenant users (#4256)
This commit is contained in:
@@ -4,6 +4,7 @@ import React, { createContext, useContext, useState, useCallback } from "react";
|
|||||||
import { NewTeamModal } from "../modals/NewTeamModal";
|
import { NewTeamModal } from "../modals/NewTeamModal";
|
||||||
import NewTenantModal from "../modals/NewTenantModal";
|
import NewTenantModal from "../modals/NewTenantModal";
|
||||||
import { User, NewTenantInfo } from "@/lib/types";
|
import { User, NewTenantInfo } from "@/lib/types";
|
||||||
|
import { NEXT_PUBLIC_CLOUD_ENABLED } from "@/lib/constants";
|
||||||
|
|
||||||
type ModalContextType = {
|
type ModalContextType = {
|
||||||
showNewTeamModal: boolean;
|
showNewTeamModal: boolean;
|
||||||
@@ -48,7 +49,7 @@ export const ModalProvider: React.FC<{
|
|||||||
|
|
||||||
// Render all application-wide modals
|
// Render all application-wide modals
|
||||||
const renderModals = () => {
|
const renderModals = () => {
|
||||||
if (!user) return null;
|
if (!user || !NEXT_PUBLIC_CLOUD_ENABLED) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
Reference in New Issue
Block a user