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 => ( +
+ ))} +