Skip to content

Commit

Permalink
Removed duplicate 'canEdit' definition (#37451)
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoGanancia committed Apr 4, 2024
1 parent 132b99f commit 9ab50c6
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import keyboardShortcutIdentifier from "src/dag/keyboardShortcutIdentifier";
import ActionButton from "./ActionButton";
import ActionModal from "./ActionModal";

const canEdit = getMetaValue("can_edit") === "True";
const dagId = getMetaValue("dag_id");

interface Props {
Expand Down Expand Up @@ -82,8 +83,6 @@ const ClearModal = ({
const [failed, setFailed] = useState(false);
const onToggleFailed = () => setFailed(!failed);

const canEdit = getMetaValue("can_edit") === "True";

const initialClearButtonFocusRef = useRef<HTMLButtonElement>(null);

const mapIndexes =
Expand Down Expand Up @@ -243,7 +242,6 @@ const ClearInstance = ({
useKeysPress(keyboardShortcutIdentifier.taskRunClear, onOpen);

const clearLabel = "Clear and retry task.";
const canEdit = getMetaValue("can_edit") === "True";
const canEditTaskInstance = getMetaValue("can_edit_taskinstance") === "True";

return (
Expand Down

0 comments on commit 9ab50c6

Please sign in to comment.