Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maamalama committed May 14, 2024
1 parent 9d8ac5d commit 9cae027
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions web/components/templates/dashboard/useDashboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ export const useDashboardPage = ({
const userFilters = filterUIToFilterLeafs(filterMap, uiFilters);
const { isLoading: isModelsLoading, models } = useModels(
timeFilter,
userFilters,
1000
1000,
userFilters
);
const topModels =
models?.data
Expand Down
6 changes: 3 additions & 3 deletions web/services/hooks/models.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { FilterLeaf, filterListToTree } from "../lib/filters/filterDefs";

const useModels = (
timeFilter: TimeFilter,
userFilters: FilterLeaf[],
limit: number
limit: number,
userFilters?: FilterLeaf[]
) => {
const { data: models, isLoading } = useQuery({
queryKey: ["modelMetrics", timeFilter, userFilters],
Expand All @@ -18,7 +18,7 @@ const useModels = (
"Content-Type": "application/json",
},
body: JSON.stringify({
filter: filterListToTree(userFilters, "and"),
filter: userFilters ? filterListToTree(userFilters, "and") : "all",
offset: 0,
limit,
timeFilter,
Expand Down

0 comments on commit 9cae027

Please sign in to comment.