From 6aaa135e656fa002c6a3394bd7eb0993ef8d7340 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Tue, 3 Dec 2024 14:05:10 +0100 Subject: [PATCH] remove badge and diff request on load --- .../Sidebar/Publish/PublishFlowButton.tsx | 29 +++++-------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Publish/PublishFlowButton.tsx b/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Publish/PublishFlowButton.tsx index a90bf41c48..54c2abf020 100644 --- a/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Publish/PublishFlowButton.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Publish/PublishFlowButton.tsx @@ -1,4 +1,3 @@ -import Badge from "@mui/material/Badge"; import Box from "@mui/material/Box"; import Button from "@mui/material/Button"; import Dialog from "@mui/material/Dialog"; @@ -98,35 +97,21 @@ export const PublishFlowButton: React.FC<{ previewURL: string }> = ({ setLastPublishedTitle(formatLastPublishMessage(date, user)); }, [flowId]); - const _validateAndDiffRequest = useAsync(async () => { - const newChanges = await validateAndDiffFlow(flowId); - setAlteredNodes( - newChanges?.data.alteredNodes ? newChanges.data.alteredNodes : [], - ); - }, [flowId]); - // useStore.getState().getTeam().slug undefined here, use window instead const teamSlug = window.location.pathname.split("/")[1]; return ( - - - + CHECK FOR CHANGES TO PUBLISH + setDialogOpen(false)}