Skip to content

Commit

Permalink
Use draft
Browse files Browse the repository at this point in the history
  • Loading branch information
louptheron committed Feb 15, 2024
1 parent 9c8d3dc commit 0a45613
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/features/VesselSidebar/Controls/Control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type ControlProps = {
export function Control({ control, isLastItem }: ControlProps) {
const isSuperUser = useIsSuperUser()
const dispatch = useMainAppDispatch()
const openedMissionId = useMainAppSelector(store => store.sideWindow.selectedPath.id)
const openedMissionDraft = useMainAppSelector(store => store.mission.draft)
const numberOfInfractions = useMemo(() => getNumberOfInfractions(control), [control])
const gearAndSpeciesInfractionsLength = useMemo(
() => control.gearInfractions.length + control.speciesInfractions.length,
Expand Down Expand Up @@ -142,7 +142,7 @@ export function Control({ control, isLastItem }: ControlProps) {
</OtherComments>
)}
{isSuperUser && (
<ModifyButton accent={Accent.SECONDARY} disabled={!!openedMissionId} onClick={openMission}>
<ModifyButton accent={Accent.SECONDARY} disabled={!!openedMissionDraft} onClick={openMission}>
Ouvrir le contrôle
</ModifyButton>
)}
Expand Down

0 comments on commit 0a45613

Please sign in to comment.