I have a create selector that returns needs three arguments I'm not able to pass them correctly with useSelector().
const participantCourseApplications = useSelector((state) =>
selectParticipantCourseApplicationIds(state, user.id, courseId)
);
This is my createSelector from the applicationsApiSlice
export const selectParticipantCourseApplicationIds = createSelector(
[
selectAllApplications,
(state, participantId) => participantId,
(state, courseId) => courseId,
],
(applications, participantId, courseId) =>
applications
.filter(
(filteredApplication) =>
filteredApplication.participants.includes(participantId) &&
filteredApplication.courseId === courseId
)
.map((mappedApplication) => mappedApplication.id)
);