From f9a42cf50deabb226cd79d218b56fb67553dafdf Mon Sep 17 00:00:00 2001 From: ZecD Date: Fri, 9 Aug 2024 17:49:57 +0200 Subject: [PATCH] WIP --- src/pages/UxDashboard/Sidebar.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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