From a6a5f2fcce1139fad7db88bf7d775dccf0231980 Mon Sep 17 00:00:00 2001 From: cchalopin Date: Mon, 26 Aug 2024 11:29:56 +0200 Subject: [PATCH] feat: display redeploy button only on change append --- web/src/components/DeployButtons.tsx | 11 ++++++++++- web/src/components/DeploySettings.tsx | 5 ++++- web/src/components/DisplayLogs.tsx | 2 +- web/src/pages/DeployPage.tsx | 9 ++++++++- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/web/src/components/DeployButtons.tsx b/web/src/components/DeployButtons.tsx index 5203a7c..7fd93e7 100644 --- a/web/src/components/DeployButtons.tsx +++ b/web/src/components/DeployButtons.tsx @@ -12,11 +12,15 @@ import ModalDeleteConfirmation from "./modals/ModalDeleteConfirmation"; type DeployButtonsProps = { deploy: DeployDto; + toReDeploy: boolean; + setToReDeploy: (toReDeploy: boolean) => void; fetchDeployById: (deployId: string) => void; }; export default function DeployButtons({ deploy, + toReDeploy, + setToReDeploy, fetchDeployById, }: DeployButtonsProps) { const navigate = useNavigate(); @@ -48,6 +52,7 @@ export default function DeployButtons({ navigate(`/deploy/${deploy.id}/installation`); await reDeployAppApi(deploy.id); setReDeployButtonState(ButtonStateEnum.SUCESS); + setToReDeploy(false); fetchDeployById(deploy.id); } catch (e) { console.error(e); @@ -99,7 +104,11 @@ export default function DeployButtons({ "Start" )} -