Skip to content

Commit

Permalink
test out disabling flow editing & publishing buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Sep 20, 2023
1 parent 0871a2f commit 4e0c16a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ const PreviewBrowser: React.FC<{
sx={{ width: "100% " }}
variant="contained"
color="primary"
disabled={useStore.getState().getUser().isViewOnly}
onClick={async () => {
try {
setLastPublishedTitle("Checking for changes...");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ const FormModal: React.FC<{
handleDelete();
navigate(rootFlowPath(true));
}}
disabled={useStore.getState().getUser().isViewOnly}
>
delete
</Button>
Expand All @@ -197,6 +198,7 @@ const FormModal: React.FC<{
makeUnique(id, parent);
navigate(rootFlowPath(true));
}}
disabled={useStore.getState().getUser().isViewOnly}
>
make unique
</Button>
Expand All @@ -210,6 +212,7 @@ const FormModal: React.FC<{
variant="contained"
color="primary"
form="modal"
disabled={useStore.getState().getUser().isViewOnly}
>
{handleDelete ? `Update ${type}` : `Create ${type}`}
</Button>
Expand Down

0 comments on commit 4e0c16a

Please sign in to comment.