clean up
This commit is contained in:
1 parent
9d8cc9ed3e
commit
8058e314db
27 files changed
+87608
-11878
No files matched your search
@@ -7,6 +7,7 @@ import { DAGBoardElmDims } from 'components/DAGSvgs/DAGBoard';
|
||||
import { defaultAutomation } from '../../utils/defaults';
|
||||
import { ArrowIcon, TrashIcon } from "components/Icons";
|
||||
import { ButtonIcon } from "components/Icons/ButtonIcons";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
|
||||
|
||||
interface Props {
|
||||
@@ -25,9 +26,12 @@ export const AutomationList: FC<Props> = ({
|
||||
dims,
|
||||
}) => {
|
||||
// state
|
||||
const [current, setCurrent] = useState(0);
|
||||
const [searchParams, setSearchParams] = useSearchParams();
|
||||
// const [current, setCurrent] = useState(0);
|
||||
const [hideList, setHideList] = useState(false);
|
||||
// alias
|
||||
const current = Number(searchParams.get("current") ?? "0");
|
||||
const setCurrent = (i: number) => setSearchParams({ current: String(i) });
|
||||
const currentAuto = automations.length > 0 ? automations[current] : null;
|
||||
const automationListListCls = "automation-list--list" + (hideList ? " hide" : " show")
|
||||
// render
|
||||
|
||||
Reference in new issue
Block a user