Skip to content

Commit

Permalink
fix: Add missing mobx observer wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
mman committed Oct 3, 2024
1 parent ee7865a commit c37ec08
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/app/Marine2/components/boxes/EnergyAC/EnergyAC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -43,4 +44,4 @@ const EnergyAC = ({ componentMode = "compact", compactBoxSize }: Props) => {
)
}

export default EnergyAC
export default observer(EnergyAC)
3 changes: 2 additions & 1 deletion src/app/Marine2/components/boxes/EnergyDC/EnergyDC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -52,4 +53,4 @@ const EnergyDC = ({ componentMode = "compact", dcLoads, compactBoxSize }: Props)
)
}

export default EnergyDC
export default observer(EnergyDC)
3 changes: 2 additions & 1 deletion src/app/Marine2/components/boxes/EnergySolar/EnergySolar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -48,4 +49,4 @@ interface Props {
compactBoxSize?: ISize
}

export default EnergySolar
export default observer(EnergySolar)

0 comments on commit c37ec08

Please sign in to comment.