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:
2026-08-15 22:56:04 +09:00
parent 48a3da30d0
commit 8a3ee0a1d7
2 changed files with 115 additions and 64 deletions
@@ -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,
})
}