From 1ef1dc82e1457dc6fc82f92f12b8af38b3f47fdd Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Fri, 19 Apr 2024 16:54:34 -0400 Subject: [PATCH] only show single slot fixtures behind module fixtures --- components/src/hardware-sim/BaseDeck/BaseDeck.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/src/hardware-sim/BaseDeck/BaseDeck.tsx b/components/src/hardware-sim/BaseDeck/BaseDeck.tsx index fd699787138..d896c0c9370 100644 --- a/components/src/hardware-sim/BaseDeck/BaseDeck.tsx +++ b/components/src/hardware-sim/BaseDeck/BaseDeck.tsx @@ -105,10 +105,12 @@ export function BaseDeck(props: BaseDeckProps): JSX.Element { fixture.cutoutFixtureId != null && (SINGLE_SLOT_FIXTURES.includes(fixture.cutoutFixtureId) || // If module fixture is loaded, still visualize singleSlotFixture underneath for consistency - Object.entries(MODULE_FIXTURES_BY_MODEL).reduce( - (acc, [_model, fixtures]) => [...acc, ...fixtures], - [] - )) + Object.entries(MODULE_FIXTURES_BY_MODEL) + .reduce( + (acc, [_model, fixtures]) => [...acc, ...fixtures], + [] + ) + .includes(fixture.cutoutFixtureId)) ) const stagingAreaFixtures = deckConfig.filter( fixture =>