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