diff --git a/superset-frontend/src/dashboard/components/EmbeddedModal/index.tsx b/superset-frontend/src/dashboard/components/EmbeddedModal/index.tsx index 1135076812a4..f77d5a9035f9 100644 --- a/superset-frontend/src/dashboard/components/EmbeddedModal/index.tsx +++ b/superset-frontend/src/dashboard/components/EmbeddedModal/index.tsx @@ -64,6 +64,7 @@ export const DashboardEmbedControls = ({ dashboardId, onHide }: Props) => { const [loading, setLoading] = useState(false); // whether we are currently doing an async thing const [embedded, setEmbedded] = useState(null); // the embedded dashboard config const [allowedDomains, setAllowedDomains] = useState(''); + const [modal, contextHolder] = Modal.useModal(); const endpoint = `/api/v1/dashboard/${dashboardId}/embedded`; // whether saveable changes have been made to the config @@ -100,7 +101,7 @@ export const DashboardEmbedControls = ({ dashboardId, onHide }: Props) => { }, [endpoint, allowedDomains]); const disableEmbedded = useCallback(() => { - Modal.confirm({ + modal.confirm({ title: t('Disable embedding?'), content: t('This will remove your current embed configuration.'), okType: 'danger', @@ -128,7 +129,7 @@ export const DashboardEmbedControls = ({ dashboardId, onHide }: Props) => { }); }, }); - }, [endpoint]); + }, [endpoint, modal]); useEffect(() => { setReady(false); @@ -167,6 +168,7 @@ export const DashboardEmbedControls = ({ dashboardId, onHide }: Props) => { return ( <> + {contextHolder} {embedded ? ( DocsConfigDetails ? (