From f24f8b4fbe064881a89a2d9cf7c670844d5ecd1d Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Thu, 1 Jun 2023 16:02:37 +0200 Subject: [PATCH] fix(ui): check for projects --- frontend/app/components/Client/Sites/NewSiteForm.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/app/components/Client/Sites/NewSiteForm.js b/frontend/app/components/Client/Sites/NewSiteForm.js index e892f137f..8efa0da24 100644 --- a/frontend/app/components/Client/Sites/NewSiteForm.js +++ b/frontend/app/components/Client/Sites/NewSiteForm.js @@ -28,6 +28,7 @@ const NewSiteForm = ({ onClose, mstore, activeSiteId, + canDelete, }) => { const [existsError, setExistsError] = useState(false); @@ -115,7 +116,7 @@ const NewSiteForm = ({ {site.exists() ? 'Update' : 'Add'} {site.exists() && ( - )} @@ -132,6 +133,7 @@ const mapStateToProps = (state) => ({ site: state.getIn(['site', 'instance']), siteList: state.getIn(['site', 'list']), loading: state.getIn(['site', 'save', 'loading']) || state.getIn(['site', 'remove', 'loading']), + canDelete: state.getIn(['site', 'list']).size > 1, }); export default connect(mapStateToProps, {