enhancement: skip fetching to improve user experience when switching … (#2580)

This commit is contained in:
Rozstone 2024-02-27 19:16:22 +08:00 • committed by GitHub
commit f1cbd55007
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 61 additions and 35 deletions

View file

@ -1,7 +1,11 @@
import { del, get, patch, post } from './base'
import type { App, AppCategory } from '@/models/explore'
export const fetchAppList = () => {
return get('/explore/apps')
return get<{
categories: AppCategory[]
recommended_apps: App[]
}>('/explore/apps')
}
export const fetchAppDetail = (id: string): Promise<any> => {