diff --git a/src/renderer/components/update-button/update-button.tsx b/src/renderer/components/update-button/update-button.tsx index 599c73e887..0185a80c02 100644 --- a/src/renderer/components/update-button/update-button.tsx +++ b/src/renderer/components/update-button/update-button.tsx @@ -8,20 +8,18 @@ import styles from "./styles.module.scss"; import type { HTMLAttributes } from "react"; import React, { useState } from "react"; import { Menu, MenuItem } from "../menu"; -import { cssNames } from "../../utils"; +import { cssNames, noop } from "../../utils"; import type { IconProps } from "../icon"; import { Icon } from "../icon"; import { withInjectables } from "@ogre-tools/injectable-react"; import { observer } from "mobx-react"; -import appUpdateWarningLevelInjectable from "../../app-update-warning/app-update-warning-level.injectable"; -import type { IComputedValue } from "mobx"; -import quitAndInstallUpdateInjectable from "../../../main/electron-app/features/quit-and-install-update.injectable"; +import updateWarningLevelInjectable from "../../../main/application-update/update-warning-level/update-warning-level.injectable"; interface UpdateButtonProps extends HTMLAttributes { } interface Dependencies { - warningLevel?: IComputedValue<"light" | "medium" | "high" | "">; + warningLevel: "light" | "medium" | "high" | ""; update: () => void; } @@ -34,7 +32,7 @@ export const NonInjectedUpdateButton = observer(({ warningLevel, update, id }: U setOpened(!opened); }; - if (!warningLevel || !warningLevel.get()) { + if (!warningLevel) { return null; } @@ -42,11 +40,11 @@ export const NonInjectedUpdateButton = observer(({ warningLevel, update, id }: U <>