Skip to content

Commit

Permalink
Refactor instructor list query in users.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
b-l-i-n-d committed Oct 2, 2024
1 parent dcfd8a5 commit c840a4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/react/v3/shared/services/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const getInstructorList = (courseId: string) => {
.then((response) => response.data);
};

export const useInstructorListQuery = (courseId: string, isAddonEnabled: boolean) => {
export const useInstructorListQuery = (courseId: string, isEnabled: boolean) => {
return useQuery({
queryKey: ['InstructorList', courseId],
queryFn: () =>
Expand All @@ -73,6 +73,6 @@ export const useInstructorListQuery = (courseId: string, isAddonEnabled: boolean
avatar_url: item.avatar_url,
}));
}),
enabled: isAddonEnabled,
enabled: isEnabled,
});
};

0 comments on commit c840a4c

Please sign in to comment.