diff --git a/frontend/src/components/common/Resource/CreateButton.tsx b/frontend/src/components/common/Resource/CreateButton.tsx index 4bd579fdb7..c2a081c162 100644 --- a/frontend/src/components/common/Resource/CreateButton.tsx +++ b/frontend/src/components/common/Resource/CreateButton.tsx @@ -147,39 +147,41 @@ export default function CreateButton(props: CreateButtonProps) { {t('translation|Create')} )} - setOpenDialog(false)} - onSave={handleSave} - saveLabel={t('translation|Apply')} - errorMessage={errorMessage} - onEditorChanged={() => setErrorMessage('')} - title={t('translation|Create / Apply')} - actions={ - clusters.length > 1 - ? [ - - {t('glossary|Cluster')} - - , - ] - : [] - } - /> + {openDialog && ( + setOpenDialog(false)} + onSave={handleSave} + saveLabel={t('translation|Apply')} + errorMessage={errorMessage} + onEditorChanged={() => setErrorMessage('')} + title={t('translation|Create / Apply')} + actions={ + clusters.length > 1 + ? [ + + {t('glossary|Cluster')} + + , + ] + : [] + } + /> + )} ); }