Skip to content

Commit 21ebb73

Browse files
committed
Update to show modal for all users with no projects
1 parent 5360fd9 commit 21ebb73

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/model-serving/modelRegistry/PreWizardDeployModal.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ import {
1212
EmptyStateBody,
1313
Bullseye,
1414
} from '@patternfly/react-core';
15-
import { Link } from 'react-router-dom';
15+
import { Link } from 'react-router';
1616
import projectImg from '@odh-dashboard/internal/images/UI_icon-Red_Hat-Folder-RGB.svg';
1717
import { ProjectKind } from '@odh-dashboard/internal/k8sTypes';
1818
import { ProjectsContext } from '@odh-dashboard/internal/concepts/projects/ProjectsContext';
19-
import { useUser } from '@odh-dashboard/internal/redux/selectors/user';
2019
import ProjectSelector from '@odh-dashboard/internal/pages/modelServing/screens/projects/InferenceServiceModal/ProjectSelector';
2120
import useServingConnections from '@odh-dashboard/internal/pages/projects/screens/detail/connections/useServingConnections';
2221
import { ModelDeployPrefillInfo } from '@odh-dashboard/internal/pages/modelServing/screens/projects/usePrefillModelDeployModal';
@@ -50,7 +49,6 @@ export const PreWizardDeployModal: React.FC<PreWizardDeployModalProps> = ({
5049
onClose,
5150
}) => {
5251
const { projects, loadError: projectsLoadError } = React.useContext(ProjectsContext);
53-
const { isAdmin } = useUser();
5452
const [selectedProject, setSelectedProject] = React.useState<ProjectKind | null>(null);
5553
const [selectedConnection, setSelectedConnection] = React.useState<Connection | undefined>(
5654
undefined,
@@ -157,7 +155,7 @@ export const PreWizardDeployModal: React.FC<PreWizardDeployModalProps> = ({
157155
(matchedConnections.length >= 2 && selectedConnection !== undefined));
158156

159157
// Show no projects modal for non-admin users with zero projects
160-
const showNoProjectsModal = !isAdmin && projects.length === 0;
158+
const showNoProjectsModal = projects.length === 0;
161159
if (showNoProjectsModal) {
162160
return (
163161
<Modal variant="medium" isOpen onClose={onClose}>

0 commit comments

Comments
 (0)