Skip to content

Commit

Permalink
fix: modal RNCP ouverte 2 fois de suite
Browse files Browse the repository at this point in the history
  • Loading branch information
totakoko committed Oct 5, 2023
1 parent 34c4bf2 commit d79c1e7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ui/modules/organismes/IndicateursEffectifsParFormationTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ function IndicateursEffectifsParFormationTable(props: IndicateursEffectifsParFor
return {};
}
});
console.log("ficheRNCP", ficheRNCP);
const [expandedNiveaux, setExpandedNiveaux] = useState<{ [niveau: string]: boolean }>({});

function toggleExpand(niveau: string) {
Expand Down Expand Up @@ -207,7 +206,14 @@ function IndicateursEffectifsParFormationTable(props: IndicateursEffectifsParFor
</Table>

{ficheRNCP && (
<Modal isOpen={isOpen} onClose={onClose} size="3xl">
<Modal
isOpen={isOpen}
onClose={() => {
onClose();
setSelectedCodeRNCP(null);
}}
size="3xl"
>
<ModalOverlay />
<ModalContent borderRadius="0" p="2w" pb="4w">
<ModalHeader display="flex" alignItems="center" fontSize="24px" pl="0">
Expand All @@ -224,7 +230,6 @@ function IndicateursEffectifsParFormationTable(props: IndicateursEffectifsParFor
variant="whiteBg"
href={`https://www.francecompetences.fr/recherche/rncp/${ficheRNCP.rncp?.substring(4)}`}
isExternal
borderBottom="1px"
ml="auto !important"
>
Consulter la fiche
Expand Down

0 comments on commit d79c1e7

Please sign in to comment.