diff --git a/src/app/Marine2/utils/hooks/use-available-energy-boxes.tsx b/src/app/Marine2/utils/hooks/use-available-energy-boxes.tsx index 12b660a0f..ffa63538c 100644 --- a/src/app/Marine2/utils/hooks/use-available-energy-boxes.tsx +++ b/src/app/Marine2/utils/hooks/use-available-energy-boxes.tsx @@ -1,5 +1,6 @@ import { useAcLoads, + useActiveSource, useAlternators, useDcLoads, usePvCharger, @@ -21,6 +22,7 @@ import { ISize } from "@m2Types/generic/size" // Noticed some data inconsistencies (undefined values) when using this array.push method/prop data. export const useAvailableEnergyBoxes = (compactBoxSize: ISize, componentMode?: ComponentMode) => { const { inputId: shoreInputId } = useShorePowerInput() + const { activeInput } = useActiveSource() const { phases } = useAcLoads() const dcLoads = useDcLoads() const pvCharger = usePvCharger() @@ -29,7 +31,7 @@ export const useAvailableEnergyBoxes = (compactBoxSize: ISize, componentMode?: C const boxes = [] - if (shoreInputId) { + if (shoreInputId && activeInput) { boxes.push(