From 13ad7ef7e6613bdd640cdfca7ce99a892b3893be Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Wed, 7 Aug 2024 18:08:36 +0100 Subject: [PATCH] fix: show correct SAML Frontend URL on edit (#4462) --- frontend/web/components/modals/CreateSAML.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/web/components/modals/CreateSAML.tsx b/frontend/web/components/modals/CreateSAML.tsx index b81e6d153334..2e83592ebc0b 100644 --- a/frontend/web/components/modals/CreateSAML.tsx +++ b/frontend/web/components/modals/CreateSAML.tsx @@ -69,7 +69,7 @@ const CreateSAML: FC = ({ organisationId, samlName }) => { return regularExpresion.test(name) } - const convetToXmlFile = (fileName: string, data: string) => { + const convertToXmlFile = (fileName: string, data: string) => { const blob = new Blob([data], { type: 'application/xml' }) const link = document.createElement('a') link.download = `${fileName}.xml` @@ -82,7 +82,7 @@ const CreateSAML: FC = ({ organisationId, samlName }) => { getSamlConfigurationMetadata(getStore(), { name: previousName }) .then((res) => { if (res.error) { - convetToXmlFile(previousName, res.error.data) + convertToXmlFile(previousName, res.error.data) } }) .finally(() => { @@ -92,7 +92,7 @@ const CreateSAML: FC = ({ organisationId, samlName }) => { const downloadIDPMetadata = () => { const name = data?.name || samlName - convetToXmlFile(`IDP metadata ${name!}`, data?.idp_metadata_xml || '') + convertToXmlFile(`IDP metadata ${name!}`, data?.idp_metadata_xml || '') } const Tab1 = ( @@ -123,7 +123,7 @@ const CreateSAML: FC = ({ organisationId, samlName }) => { data-test='frontend-url' tooltip='The base URL of the Flagsmith dashboard' tooltipPlace='right' - value={frontendUrl} + value={data?.frontend_url || frontendUrl} onChange={(event: React.ChangeEvent) => { setFrontendUrl(Utils.safeParseEventValue(event)) }}