From 6da9d25e617136d798c62a296d5451afa427c7fc Mon Sep 17 00:00:00 2001 From: viown <48097677+viown@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:53:35 +0300 Subject: [PATCH] Give activity logs a unique key and fix typo --- src/apps/dashboard/features/activity/api/useLogEntries.ts | 4 ++-- src/apps/dashboard/routes/activity/index.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/dashboard/features/activity/api/useLogEntries.ts b/src/apps/dashboard/features/activity/api/useLogEntries.ts index b0f1be523388..ba956d51710a 100644 --- a/src/apps/dashboard/features/activity/api/useLogEntries.ts +++ b/src/apps/dashboard/features/activity/api/useLogEntries.ts @@ -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 diff --git a/src/apps/dashboard/routes/activity/index.tsx b/src/apps/dashboard/routes/activity/index.tsx index 666d08441c9c..5b0e328777cc 100644 --- a/src/apps/dashboard/routes/activity/index.tsx +++ b/src/apps/dashboard/routes/activity/index.tsx @@ -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'; @@ -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;