clean up
This commit is contained in:
1 parent
baada590c5
commit
44ad46cff3
6 files changed
+13
-6
No files matched your search
@@ -33,9 +33,15 @@ export const makeRemoteAPI = (baseURL: string): API => ({
|
|||||||
return response
|
return response
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
|
let error = String(err)
|
||||||
|
|
||||||
|
if (err instanceof Error) {
|
||||||
|
error += ` ${err.stack}`
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
ok: false,
|
ok: false,
|
||||||
error: `${err} ${err?.stack}`,
|
error,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,5 +34,6 @@ Basic.args = {
|
|||||||
'wowo': '!'
|
'wowo': '!'
|
||||||
},
|
},
|
||||||
mode: 'single',
|
mode: 'single',
|
||||||
}
|
tags: {},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
@@ -46,6 +46,7 @@ Simple.args = {
|
|||||||
'wowo': '!'
|
'wowo': '!'
|
||||||
},
|
},
|
||||||
mode: 'single',
|
mode: 'single',
|
||||||
|
tags: {},
|
||||||
},
|
},
|
||||||
trigger: [
|
trigger: [
|
||||||
{
|
{
|
||||||
@@ -115,6 +116,7 @@ EmptyStart.args = {
|
|||||||
'wowo': '!'
|
'wowo': '!'
|
||||||
},
|
},
|
||||||
mode: 'single',
|
mode: 'single',
|
||||||
|
tags: {},
|
||||||
},
|
},
|
||||||
trigger: [
|
trigger: [
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import "./index.css";
|
import "./index.css";
|
||||||
import { AutomationEditor } from "components/AutomationEditor";
|
import { AutomationEditor } from "components/AutomationEditor";
|
||||||
import { Button } from "components/Inputs/Button";
|
|
||||||
import { FC, useState } from "react";
|
import { FC, useState } from "react";
|
||||||
import { AutomationData } from "types/automations";
|
import { AutomationData } from "types/automations";
|
||||||
import { DAGBoardElmDims } from 'components/DAGSvgs/DAGBoard';
|
import { DAGBoardElmDims } from 'components/DAGSvgs/DAGBoard';
|
||||||
import { defaultAutomation } from '../../utils/defaults';
|
import { defaultAutomation } from '../../utils/defaults';
|
||||||
import { ArrowIcon, TrashIcon } from "components/Icons";
|
import { ArrowIcon } from "components/Icons";
|
||||||
import { ButtonIcon } from "components/Icons/ButtonIcons";
|
import { ButtonIcon } from "components/Icons/ButtonIcons";
|
||||||
import { ApiService } from "apiService/core";
|
import { ApiService } from "apiService/core";
|
||||||
import { AutomationListBox } from "./AutomationListBox";
|
import { AutomationListBox } from "./AutomationListBox";
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { ArrowIcon } from "components/Icons";
|
import { ArrowIcon } from "components/Icons";
|
||||||
import InputWrapper from "./InputWrapper";
|
|
||||||
import { useInputMultiSelectStyles } from "./styles";
|
import { useInputMultiSelectStyles } from "./styles";
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
@@ -15,7 +14,6 @@ export interface Props<T extends string> {
|
|||||||
}
|
}
|
||||||
export default function InputMultiSelect<T extends string>({
|
export default function InputMultiSelect<T extends string>({
|
||||||
selected = [], options, onChange, label, max,
|
selected = [], options, onChange, label, max,
|
||||||
...selattr
|
|
||||||
}: Props<T>) {
|
}: Props<T>) {
|
||||||
// state
|
// state
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ export const defaultAutomation = (id: string): AutomationData => ({
|
|||||||
alias: "New Automation",
|
alias: "New Automation",
|
||||||
description: "",
|
description: "",
|
||||||
mode: "single",
|
mode: "single",
|
||||||
|
tags: {},
|
||||||
},
|
},
|
||||||
trigger: [],
|
trigger: [],
|
||||||
sequence: [],
|
sequence: [],
|
||||||
|
|||||||
Reference in new issue
Block a user