fix(deployments): display gpu allocated value in gpu selector

This commit is contained in:
jialin
2026-07-06 17:48:22 +08:00
committed by jialin
parent 3a1565690d
commit dc41b61d69
4 changed files with 34 additions and 31 deletions
@@ -77,7 +77,7 @@ export default function useAddResource(options?: { onCreated?: () => void }) {
}, [resourceAtom, loadingStatus]);
const contentInfo = useMemo(() => {
if (!resourceCount.cluster_count) {
if (!resourceCount?.cluster_count) {
return {
title: intl.formatMessage({ id: 'noresult.cluster.title' }),
subTitle: intl.formatMessage({ id: 'noresult.resources.cluster' }),
@@ -98,7 +98,7 @@ export default function useAddResource(options?: { onCreated?: () => void }) {
const handleCreate = () => {
setHideModalTemporarily(true);
onCreated?.();
if (!resourceCount.cluster_count) {
if (!resourceCount?.cluster_count) {
setClusterSession({
firstAddWorker: false,
firstAddCluster: true