Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
iDome89 committed Aug 9, 2024
1 parent 89ab40b commit 793dd4a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/pages/UxDashboard/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -68,7 +69,7 @@ const Sidebar = () => {
disabled={isSubmitting}
onClick={handleSaveDraft}
>
Salva e nascondi
Salva
</Button>

<Button
Expand All @@ -77,13 +78,11 @@ const Sidebar = () => {
kind="secondary"
data-qa="publish-dashboard"
disabled={
publishStatus === "publishing" ||
values.visible === undefined ||
values.visible === 1
publishStatus === "publishing" || values.visible === undefined
}
onClick={handlePublish}
>
Pubblica
{values.visible === 0 ? "Pubblica" : "Nascondi"}
</Button>
</>
</Card>
Expand Down

0 comments on commit 793dd4a

Please sign in to comment.