delete auto
This commit is contained in:
1 parent
3f0430ab37
commit
473684efa6
4 files changed
+32
-4
No files matched your search
@@ -10,10 +10,12 @@ import {
|
||||
} from "./state";
|
||||
import Alert from "@mui/material/Alert";
|
||||
|
||||
export type AutomationManagerLoadedProps = UseAutomationManagerStateArgs & {};
|
||||
export type AutomationManagerLoadedProps = UseAutomationManagerStateArgs & {
|
||||
onAutomationDelete: (aid: string) => void;
|
||||
};
|
||||
export const AutomationManagerLoaded: FC<
|
||||
PropsWithChildren<AutomationManagerLoadedProps>
|
||||
> = ({ children, ...args }) => {
|
||||
> = ({ children, onAutomationDelete, ...args }) => {
|
||||
const state = useAutomationManagerState(args);
|
||||
|
||||
return (
|
||||
@@ -25,7 +27,7 @@ export const AutomationManagerLoaded: FC<
|
||||
selectedAutomationId={state.currentAutomationId}
|
||||
onSelectedAutomationId={state.setSelectedAutomationId}
|
||||
onAutomationAdd={() => state.addNew()}
|
||||
onAutomationDelete={() => {}}
|
||||
onAutomationDelete={onAutomationDelete}
|
||||
onAutomationUpdate={() => {}}
|
||||
/>
|
||||
<div className={["automation-manager--editor"].join(" ")}>
|
||||
|
||||
@@ -10,7 +10,6 @@ export type UseAutomationManagerStateArgs = {
|
||||
configAutomations: AutomationData[];
|
||||
hassEntities: HassEntities;
|
||||
onUpdateTags: (aid: string, tags: Record<string, string>) => void;
|
||||
// onAutomationDelete: (aid: string) => void;
|
||||
onAutomationAdd: (auto: AutomationData) => void;
|
||||
};
|
||||
export const useAutomationManagerState = ({
|
||||
|
||||
Reference in new issue
Block a user