diff --git a/Dockerfile b/Dockerfile index eff8c8a..e053776 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,8 @@ RUN apk add --no-cache \ npm \ build-base \ python3-dev -RUN pip install -U wheel setuptools pip +RUN pip install -U wheel setuptools pip && \ + npm i -g yarn # <--- Python Dependencies --> COPY api/setup.py /app/setup.py @@ -22,8 +23,8 @@ RUN pip install . /app # <--- Webapp Build --> COPY webapp/ /app/web-builder RUN cd /app/web-builder && \ - npm install && \ - npm run build && \ + yarn && \ + yarn build && \ cp -r /app/web-builder/build /app/web && \ rm -rf /app/web-builder diff --git a/webapp/src/components/AutomationEditor/index.tsx b/webapp/src/components/AutomationEditor/index.tsx index b359446..8c6fb2e 100644 --- a/webapp/src/components/AutomationEditor/index.tsx +++ b/webapp/src/components/AutomationEditor/index.tsx @@ -124,7 +124,7 @@ export const AutomationEditor: FC = ({ type: "", subtype: "" }, - onSave: (t) => updateTrigger([...automation.trigger, t]) + onSave: (t) => updateTrigger([...state.data.trigger, t]) }); }, (trigger, onSave) => setModalState({ diff --git a/webapp/src/components/AutomationEditor/state.ts b/webapp/src/components/AutomationEditor/state.ts index 68df434..ff35d13 100644 --- a/webapp/src/components/AutomationEditor/state.ts +++ b/webapp/src/components/AutomationEditor/state.ts @@ -9,7 +9,7 @@ export type EditorState = { } | { status: 'loading' } -export type EditorStatus = EditorState[0]; +export type EditorStatus = EditorState['status']; export const useAutomatioEditorState = ( automation: AutomationData,