Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikmv committed Jul 5, 2024
1 parent 5fb5296 commit 91c2530
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { useMemo } from 'react';
import { useSelector } from 'react-redux';

export const useCanAddNewEventToStage = (programStage, existingRelatedEvents) => {
const hiddenProgramStages = useSelector(({ rulesEffectsHiddenProgramStageDesc }) =>
rulesEffectsHiddenProgramStageDesc?.['enrollmentEvent-newEvent']
const hiddenProgramStages = useSelector(({ rulesEffectsHiddenProgramStageDesc }) =>
rulesEffectsHiddenProgramStageDesc?.['enrollmentEvent-newEvent'],
);

return useMemo(() => {
const isProgramStageHidden = hiddenProgramStages?.[programStage.id];

if (isProgramStageHidden) { return false }
if (isProgramStageHidden) { return false; }

return programStage && existingRelatedEvents
? programStage.repeatable || (!programStage.repeatable && existingRelatedEvents.length === 0)
Expand Down

0 comments on commit 91c2530

Please sign in to comment.