delay fixes

This commit is contained in:
ari committed 2022-06-12 22:23:30 -04:00
1 parent 5207c48f8d
commit d824a93695
5 files changed
+13 -7

No files matched your search

@@ -7,13 +7,12 @@ import { InputTime } from "components/Inputs/InputTime";
import { useState } from "react";
import { DelayAction, WaitAction } from "types/automations/actions";
import { OptionManager, updateActionData } from './OptionManager';
import { getNodeSubType } from 'utils/automations';
import InputYaml from "components/Inputs/InputYaml";
type ThisAction = WaitAction | DelayAction;
type Option = 'delay' | 'template' | 'trigger'
const getCurrentOption = (node: ThisAction): Option => {
if (getNodeSubType(node) === 'delay') {
if ('delay' in node) {
return 'delay'
} else {
return 'template'