Skip to content

Commit

Permalink
Give activity logs a unique key and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
viown committed Dec 18, 2024
1 parent 864c5b2 commit 6da9d25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/apps/dashboard/features/activity/api/useLogEntries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ const fetchLogEntries = async (
return response.data;
};

export const useLogEntires = (
export const useLogEntries = (
requestParams: ActivityLogApiGetLogEntriesRequest
) => {
const { api } = useApi();
return useQuery({
queryKey: ['LogEntries', requestParams],
queryKey: ['ActivityLogEntries', requestParams],
queryFn: ({ signal }) =>
fetchLogEntries(api, requestParams, { signal }),
enabled: !!api
Expand Down
4 changes: 2 additions & 2 deletions src/apps/dashboard/routes/activity/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Typography from '@mui/material/Typography';
import { type MRT_ColumnDef, MaterialReactTable, useMaterialReactTable } from 'material-react-table';
import { useSearchParams } from 'react-router-dom';

import { useLogEntires } from 'apps/dashboard/features/activity/api/useLogEntries';
import { useLogEntries } from 'apps/dashboard/features/activity/api/useLogEntries';
import ActionsCell from 'apps/dashboard/features/activity/components/ActionsCell';
import LogLevelCell from 'apps/dashboard/features/activity/components/LogLevelCell';
import OverviewCell from 'apps/dashboard/features/activity/components/OverviewCell';
Expand Down Expand Up @@ -87,7 +87,7 @@ const Activity = () => {
hasUserId: activityView !== ActivityView.All ? activityView === ActivityView.User : undefined
}), [activityView, pagination.pageIndex, pagination.pageSize]);

const { data: logEntries, isLoading: isLogEntriesLoading } = useLogEntires(activityParams);
const { data: logEntries, isLoading: isLogEntriesLoading } = useLogEntries(activityParams);

const isLoading = isUsersLoading || isLogEntriesLoading;

Expand Down

0 comments on commit 6da9d25

Please sign in to comment.