diff --git a/apps/admin-ui/src/clients/keys/SamlKeys.tsx b/apps/admin-ui/src/clients/keys/SamlKeys.tsx index 555ced8270..99c4576cfa 100644 --- a/apps/admin-ui/src/clients/keys/SamlKeys.tsx +++ b/apps/admin-ui/src/clients/keys/SamlKeys.tsx @@ -158,7 +158,7 @@ export const SamlKeys = ({ clientId, save }: SamlKeysProps) => { const [isChanged, setIsChanged] = useState(); const [keyInfo, setKeyInfo] = useState(); const [selectedType, setSelectedType] = useState(); - const [openImport, setImportOpen] = useState(false); + const [openImport, setImportOpen] = useState(); const [refresh, setRefresh] = useState(0); const { setValue } = useFormContext(); @@ -247,11 +247,11 @@ export const SamlKeys = ({ clientId, save }: SamlKeysProps) => { {KEYS.map((attr, index) => ( - {openImport && ( + {openImport === attr && ( setImportOpen(false)} + onClose={() => setImportOpen(undefined)} /> )} { toggleReGenerateDialog(); } }} - onImport={() => setImportOpen(true)} + onImport={() => setImportOpen(attr)} /> ))}