Skip to content

Commit

Permalink
fix(core): add disable when discarding version from the document footer
Browse files Browse the repository at this point in the history
  • Loading branch information
RitaDias committed Feb 11, 2025
1 parent 76b7b11 commit 53227b1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const DiscardVersionAction = (
id,
type,
version: release,
permission: 'publish',
permission: 'discardVersion',
})

const [dialogOpen, setDialogOpen] = useState(false)
Expand All @@ -48,6 +48,7 @@ export const DiscardVersionAction = (
}

return {
disabled: isPermissionsLoading || !permissions?.granted,
dialog: dialogOpen && {
type: 'custom',
component: (
Expand Down

0 comments on commit 53227b1

Please sign in to comment.