diff --git a/src/renderer/components/update-button/update-button.tsx b/src/renderer/components/update-button/update-button.tsx index 0185a80c02..51fd5b45fa 100644 --- a/src/renderer/components/update-button/update-button.tsx +++ b/src/renderer/components/update-button/update-button.tsx @@ -13,13 +13,14 @@ import type { IconProps } from "../icon"; import { Icon } from "../icon"; import { withInjectables } from "@ogre-tools/injectable-react"; import { observer } from "mobx-react"; -import updateWarningLevelInjectable from "../../../main/application-update/update-warning-level/update-warning-level.injectable"; +import updateWarningLevelInjectable from "../../../common/application-update/update-warning-level.injectable"; +import { computed, IComputedValue } from "mobx"; interface UpdateButtonProps extends HTMLAttributes { } interface Dependencies { - warningLevel: "light" | "medium" | "high" | ""; + warningLevel: IComputedValue<"light" | "medium" | "high" | "">; update: () => void; } @@ -32,7 +33,7 @@ export const NonInjectedUpdateButton = observer(({ warningLevel, update, id }: U setOpened(!opened); }; - if (!warningLevel) { + if (!warningLevel.get()) { return null; } @@ -40,11 +41,11 @@ export const NonInjectedUpdateButton = observer(({ warningLevel, update, id }: U <>