fixed up styling for autos
This commit is contained in:
1 parent
634f3e9219
commit
c256400518
9 files changed
+104
-107
No files matched your search
@@ -12,7 +12,7 @@ export type EditorState = {
|
||||
export type EditorStatus = EditorState['status'];
|
||||
|
||||
export const useAutomatioEditorState = (
|
||||
automation: AutomationData,
|
||||
automation: AutomationData | undefined,
|
||||
onSave: (a: AutomationData) => void,
|
||||
) => {
|
||||
const [state, update] = useState<EditorState>({
|
||||
@@ -30,10 +30,12 @@ export const useAutomatioEditorState = (
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
update({
|
||||
status: 'unchanged',
|
||||
data: genEditorData(automation),
|
||||
})
|
||||
if (automation) {
|
||||
update({
|
||||
status: 'unchanged',
|
||||
data: genEditorData(automation),
|
||||
})
|
||||
}
|
||||
}, [automation]);
|
||||
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user