diff --git a/src/pages/UxDashboard/Sidebar.tsx b/src/pages/UxDashboard/Sidebar.tsx index 2202c1ce..6f43f5f4 100644 --- a/src/pages/UxDashboard/Sidebar.tsx +++ b/src/pages/UxDashboard/Sidebar.tsx @@ -35,10 +35,11 @@ const Sidebar = () => { const handlePublish = async () => { dispatch(setPublishStatus("publishing")); + debugger await saveDashboard({ campaign: id, body: { - visible: 1, + visible: values.visible === 1 ? 0 : 1, }, }) .unwrap() @@ -68,7 +69,7 @@ const Sidebar = () => { disabled={isSubmitting} onClick={handleSaveDraft} > - Salva e nascondi + Salva