mirror of
https://github.com/langgenius/dify.git
synced 2026-08-02 10:46:38 +08:00
20 lines
602 B
TypeScript
20 lines
602 B
TypeScript
'use client'
|
|
|
|
import { skipToken } from '@tanstack/react-query'
|
|
import { atomWithQuery } from 'jotai-tanstack-query'
|
|
import { consoleQuery } from '@/service/client'
|
|
import { deploymentRouteAppInstanceIdAtom } from '../../route-state'
|
|
|
|
export const deploymentOverviewQueryAtom = atomWithQuery((get) => {
|
|
const appInstanceId = get(deploymentRouteAppInstanceIdAtom)
|
|
|
|
return consoleQuery.enterprise.appInstanceService.getAppInstanceOverview.queryOptions({
|
|
input: appInstanceId
|
|
? {
|
|
params: { appInstanceId },
|
|
}
|
|
: skipToken,
|
|
enabled: Boolean(appInstanceId),
|
|
})
|
|
})
|