feature: infinite scroll (#119)

Add infinite scroll support to app list and dataset list.
This commit is contained in:
Nite Knite
2023-05-20 21:55:47 +08:00
committed by GitHub
parent e8239ae631
commit 4779fcf6f1
12 changed files with 147 additions and 61 deletions

View File

@@ -4,8 +4,8 @@ import type { ApikeysListResponse, AppDailyConversationsResponse, AppDailyEndUse
import type { CommonResponse } from '@/models/common'
import type { AppMode, ModelConfig } from '@/types/app'
export const fetchAppList: Fetcher<AppListResponse, { params?: Record<string, any> }> = ({ params }) => {
return get('apps', params) as Promise<AppListResponse>
export const fetchAppList: Fetcher<AppListResponse, { url: string; params?: Record<string, any> }> = ({ url, params }) => {
return get(url, { params }) as Promise<AppListResponse>
}
export const fetchAppDetail: Fetcher<AppDetailResponse, { url: string; id: string }> = ({ url, id }) => {