mirror of
https://github.com/langgenius/dify.git
synced 2026-02-01 16:41:58 +08:00
24 lines
552 B
TypeScript
24 lines
552 B
TypeScript
import { useQuery } from '@tanstack/react-query'
|
|
import { fetchTryAppInfo } from './try-app'
|
|
import { AppSourceType, fetchAppParams } from './share'
|
|
|
|
const NAME_SPACE = 'try-app'
|
|
|
|
export const useGetTryAppInfo = () => {
|
|
return useQuery({
|
|
queryKey: [NAME_SPACE, 'appInfo'],
|
|
queryFn: () => {
|
|
return fetchTryAppInfo()
|
|
},
|
|
})
|
|
}
|
|
|
|
export const useGetTryAppParams = () => {
|
|
return useQuery({
|
|
queryKey: [NAME_SPACE, 'appParams'],
|
|
queryFn: () => {
|
|
return fetchAppParams(AppSourceType.webApp) // todo: wait api
|
|
},
|
|
})
|
|
}
|