Skip to content

Commit

Permalink
code review change
Browse files Browse the repository at this point in the history
Signed-off-by: Scott J Dickerson <[email protected]>
  • Loading branch information
sjd78 committed Jul 15, 2024
1 parent 3b906fa commit bae5883
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions client/src/app/queries/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const TaskStates = {
};

export const TasksQueryKey = "tasks";
export const TasksPagedQueryKey = "tasksPaged";
export const TasksQueueKey = "tasksQueue";
export const TaskByIDQueryKey = "taskByID";
export const TaskAttachmentByIDQueryKey = "taskAttachmentByID";
Expand Down Expand Up @@ -74,7 +73,7 @@ export const useServerTasks = (
refetchInterval?: number
) => {
const { data, isLoading, error, refetch } = useQuery({
queryKey: [TasksPagedQueryKey, params],
queryKey: [TasksQueryKey, params],
queryFn: async () => await getServerTasks(params),
select: (data) => {
if (data?.data?.length > 0) {
Expand Down Expand Up @@ -200,7 +199,7 @@ export const useFetchTaskByID = (taskId?: number) => {
queryKey: [TaskByIDQueryKey, taskId],
queryFn: () => (taskId ? getTaskById(taskId) : null),
select: (task: Task | null) =>
task === null ? null : calculateSyntheticState(task),
!task ? null : calculateSyntheticState(task),
enabled: !!taskId,
});

Expand Down

0 comments on commit bae5883

Please sign in to comment.