From 86d6857e60115e5e344af22f3ab3541a7d8af0eb Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Tue, 12 May 2026 17:46:46 +0800 Subject: [PATCH] fix empty --- web/features/deployments/list/index.tsx | 31 +++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/web/features/deployments/list/index.tsx b/web/features/deployments/list/index.tsx index 60be35e26c..e1bcf88a91 100644 --- a/web/features/deployments/list/index.tsx +++ b/web/features/deployments/list/index.tsx @@ -1,6 +1,7 @@ 'use client' import type { ReactNode } from 'react' +import { cn } from '@langgenius/dify-ui/cn' import { keepPreviousData, useInfiniteQuery } from '@tanstack/react-query' import { debounce, useQueryState } from 'nuqs' import { useEffect, useRef } from 'react' @@ -15,6 +16,7 @@ import { NewInstanceCard } from './new-instance-card' import { envFilterQueryState, keywordsQueryState } from './query-state' const INSTANCE_CARD_SKELETON_KEYS = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth'] +const EMPTY_INSTANCE_CARD_KEYS = Array.from({ length: 36 }, (_, index) => `empty-instance-card-${index}`) function DeploymentsListState({ children }: { children: ReactNode @@ -26,6 +28,26 @@ function DeploymentsListState({ children }: { ) } +function DeploymentsListEmpty() { + const { t } = useTranslation('deployments') + + return ( + <> + {EMPTY_INSTANCE_CARD_KEYS.map(key => ( +
+ ))} +