From c37ec0861ebde6eb4ef1d8450c0d99238126d5a5 Mon Sep 17 00:00:00 2001 From: Martin Man Date: Thu, 3 Oct 2024 15:57:35 +0200 Subject: [PATCH] fix: Add missing mobx observer wrappers --- src/app/Marine2/components/boxes/EnergyAC/EnergyAC.tsx | 3 ++- src/app/Marine2/components/boxes/EnergyDC/EnergyDC.tsx | 3 ++- src/app/Marine2/components/boxes/EnergySolar/EnergySolar.tsx | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/Marine2/components/boxes/EnergyAC/EnergyAC.tsx b/src/app/Marine2/components/boxes/EnergyAC/EnergyAC.tsx index e80db5c3..3fd60a17 100644 --- a/src/app/Marine2/components/boxes/EnergyAC/EnergyAC.tsx +++ b/src/app/Marine2/components/boxes/EnergyAC/EnergyAC.tsx @@ -9,6 +9,7 @@ import { ComponentMode } from "@m2Types/generic/component-mode" import { ISize } from "@m2Types/generic/size" import { usePhasesData } from "../../../utils/hooks/use-phases-data" import { responsiveBoxIcon } from "../../../utils/helpers/classes/responsive-box-icon" +import { observer } from "mobx-react" interface Props { componentMode?: ComponentMode @@ -43,4 +44,4 @@ const EnergyAC = ({ componentMode = "compact", compactBoxSize }: Props) => { ) } -export default EnergyAC +export default observer(EnergyAC) diff --git a/src/app/Marine2/components/boxes/EnergyDC/EnergyDC.tsx b/src/app/Marine2/components/boxes/EnergyDC/EnergyDC.tsx index a790715d..41977dd6 100644 --- a/src/app/Marine2/components/boxes/EnergyDC/EnergyDC.tsx +++ b/src/app/Marine2/components/boxes/EnergyDC/EnergyDC.tsx @@ -8,6 +8,7 @@ import { responsiveBoxIcon } from "../../../utils/helpers/classes/responsive-box import { ISize } from "@m2Types/generic/size" import { valueFor } from "app/Marine2/utils/formatters/phase/phase-value-for" import { unitFor } from "app/Marine2/utils/formatters/phase/phase-unit-for" +import { observer } from "mobx-react" interface Props { dcLoads: DcLoadsState @@ -52,4 +53,4 @@ const EnergyDC = ({ componentMode = "compact", dcLoads, compactBoxSize }: Props) ) } -export default EnergyDC +export default observer(EnergyDC) diff --git a/src/app/Marine2/components/boxes/EnergySolar/EnergySolar.tsx b/src/app/Marine2/components/boxes/EnergySolar/EnergySolar.tsx index 2c5e6368..0554de97 100644 --- a/src/app/Marine2/components/boxes/EnergySolar/EnergySolar.tsx +++ b/src/app/Marine2/components/boxes/EnergySolar/EnergySolar.tsx @@ -9,6 +9,7 @@ import { responsiveBoxIcon } from "../../../utils/helpers/classes/responsive-box import { ISize } from "@m2Types/generic/size" import { unitFor } from "app/Marine2/utils/formatters/phase/phase-unit-for" import { valueFor } from "app/Marine2/utils/formatters/phase/phase-value-for" +import { observer } from "mobx-react" const EnergySolar = ({ componentMode = "compact", pvCharger, compactBoxSize }: Props) => { const { electricalPowerIndicator } = useAppStore() @@ -48,4 +49,4 @@ interface Props { compactBoxSize?: ISize } -export default EnergySolar +export default observer(EnergySolar)