feat(fe): implement working ModelsList grid with mock data
- Simplified data fetching (removed TanStack Query for now) - Added direct mock API client in component - Fixed state management (isLoading, isError, modelsData) - Grid now renders with 3 sample model records - Updated v-if conditions for loading/error/empty states - Added grid container height and filter styling Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -188,12 +188,13 @@ export const modelQueryKeys = {
|
||||
/**
|
||||
* Fetch list of models with pagination
|
||||
*/
|
||||
export function useModelsList(params: ModelListParams = {}) {
|
||||
export function useModelsList(params?: ModelListParams) {
|
||||
const finalParams = params || {}
|
||||
return useQuery({
|
||||
queryKey: modelQueryKeys.list(params),
|
||||
queryFn: () => apiClient.listModels(params),
|
||||
staleTime: 5 * 60 * 1000, // 5 minutes
|
||||
gcTime: 10 * 60 * 1000, // 10 minutes
|
||||
queryKey: ['models', 'list', finalParams],
|
||||
queryFn: () => apiClient.listModels(finalParams),
|
||||
staleTime: 5 * 60 * 1000,
|
||||
gcTime: 10 * 60 * 1000,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user