Skip to content

Commit 74b3a5d

Browse files
committed
linting, feedback
1 parent 54c7e1a commit 74b3a5d

File tree

10 files changed

+44
-67
lines changed

10 files changed

+44
-67
lines changed

components/src/hardware-sim/DeckConfigurator/AbsorbanceReaderItem.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,10 @@ export function AbsorbanceReaderItem(
6666
const y = ySlotPosition + Y_ADJUSTMENT
6767

6868
const editableStyle = selected ? CONFIG_STYLE_SELECTED : CONFIG_STYLE_EDITABLE
69-
const handleRemoveClick = () => {
70-
handleClickRemove != null
71-
? () => {
72-
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
73-
}
74-
: () => {}
69+
const handleRemoveClick = (): void => {
70+
if (handleClickRemove != null) {
71+
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
72+
}
7573
}
7674
return (
7775
<RobotCoordsForeignObject

components/src/hardware-sim/DeckConfigurator/FlexStackerItem.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,10 @@ export function FlexStackerItem(props: FlexStackerItemProps): JSX.Element {
7474
const x = xSlotPosition + offsetVector[0] + STACKER_X_ADJUSTMENT
7575

7676
const editableStyle = selected ? CONFIG_STYLE_SELECTED : CONFIG_STYLE_EDITABLE
77-
const handleRemoveClick = () => {
78-
handleClickRemove != null
79-
? () => {
80-
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
81-
}
82-
: () => {}
77+
const handleRemoveClick = (): void => {
78+
if (handleClickRemove != null) {
79+
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
80+
}
8381
}
8482
return (
8583
<RobotCoordsForeignObject

components/src/hardware-sim/DeckConfigurator/HeaterShakerItem.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,10 @@ export function HeaterShakerItem(props: HeaterShakerItemProps): JSX.Element {
7474
const y = ySlotPosition + Y_ADJUSTMENT
7575

7676
const editableStyle = selected ? CONFIG_STYLE_SELECTED : CONFIG_STYLE_EDITABLE
77-
const handleRemoveClick = () => {
78-
handleClickRemove != null
79-
? () => {
80-
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
81-
}
82-
: () => {}
77+
const handleRemoveClick = (): void => {
78+
if (handleClickRemove != null) {
79+
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
80+
}
8381
}
8482
return (
8583
<RobotCoordsForeignObject

components/src/hardware-sim/DeckConfigurator/MagneticBlockItem.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,10 @@ export function MagneticBlockItem(props: MagneticBlockItemProps): JSX.Element {
7676
const y = ySlotPosition + Y_ADJUSTMENT
7777

7878
const editableStyle = selected ? CONFIG_STYLE_SELECTED : CONFIG_STYLE_EDITABLE
79-
const handleRemoveClick = () => {
80-
handleClickRemove != null
81-
? () => {
82-
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
83-
}
84-
: () => {}
79+
const handleRemoveClick = (): void => {
80+
if (handleClickRemove != null) {
81+
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
82+
}
8583
}
8684
return (
8785
<RobotCoordsForeignObject

components/src/hardware-sim/DeckConfigurator/StagingAreaConfigItem.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,10 @@ export function StagingAreaConfigItem(
7070
const y = ySlotPosition + Y_ADJUSTMENT
7171

7272
const editableStyle = selected ? CONFIG_STYLE_SELECTED : CONFIG_STYLE_EDITABLE
73-
const handleRemoveClick = () => {
74-
handleClickRemove != null
75-
? () => {
76-
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
77-
}
78-
: () => {}
73+
const handleRemoveClick = (): void => {
74+
if (handleClickRemove != null) {
75+
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
76+
}
7977
}
8078
return (
8179
<RobotCoordsForeignObject

components/src/hardware-sim/DeckConfigurator/TemperatureModuleItem.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,10 @@ export function TemperatureModuleItem(
7777

7878
const editableStyle = selected ? CONFIG_STYLE_SELECTED : CONFIG_STYLE_EDITABLE
7979

80-
const handleRemoveClick = () => {
81-
handleClickRemove != null
82-
? () => {
83-
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
84-
}
85-
: () => {}
80+
const handleRemoveClick = (): void => {
81+
if (handleClickRemove != null) {
82+
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
83+
}
8684
}
8785
return (
8886
<RobotCoordsForeignObject

components/src/hardware-sim/DeckConfigurator/ThermocyclerItem.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,10 @@ export function ThermocyclerItem(props: ThermocyclerItemProps): JSX.Element {
6262
const y = ySlotPosition + Y_ADJUSTMENT
6363

6464
const editableStyle = selected ? CONFIG_STYLE_SELECTED : CONFIG_STYLE_EDITABLE
65-
const handleRemoveClick = () => {
66-
handleClickRemove != null
67-
? () => {
68-
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
69-
}
70-
: () => {}
65+
const handleRemoveClick = (): void => {
66+
if (handleClickRemove != null) {
67+
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
68+
}
7169
}
7270
return (
7371
<RobotCoordsForeignObject

components/src/hardware-sim/DeckConfigurator/TrashBinConfigItem.tsx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ export function TrashBinConfigItem(
7474
const y = ySlotPosition + Y_ADJUSTMENT
7575

7676
const editableStyle = selected ? CONFIG_STYLE_SELECTED : CONFIG_STYLE_EDITABLE
77+
const handleRemoveClick = (): void => {
78+
if (handleClickRemove != null) {
79+
handleClickRemove(fixtureLocation, cutoutFixtureId, addressableAreaId)
80+
}
81+
}
7782
return (
7883
<RobotCoordsForeignObject
7984
width={
@@ -90,17 +95,7 @@ export function TrashBinConfigItem(
9095
<Btn
9196
css={handleClickRemove != null ? editableStyle : CONFIG_STYLE_READ_ONLY}
9297
cursor={handleClickRemove != null ? 'pointer' : 'default'}
93-
onClick={
94-
handleClickRemove != null
95-
? () => {
96-
handleClickRemove(
97-
fixtureLocation,
98-
cutoutFixtureId,
99-
addressableAreaId
100-
)
101-
}
102-
: () => {}
103-
}
98+
onClick={handleRemoveClick}
10499
>
105100
<StyledText
106101
oddStyle="smallBodyTextSemiBold"

components/src/hardware-sim/DeckConfigurator/WasteChuteConfigItem.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,14 @@ export function WasteChuteConfigFixture(
6666
const y = ySlotPosition + Y_ADJUSTMENT
6767

6868
const editableStyle = selected ? CONFIG_STYLE_SELECTED : CONFIG_STYLE_EDITABLE
69-
const handleRemoveClick = () => {
70-
handleClickRemove != null
71-
? () => {
72-
handleClickRemove(
73-
fixtureLocation,
74-
cutoutFixtureId,
75-
DEFAULT_AA_FOR_WASTE_CHUTE
76-
)
77-
}
78-
: () => {}
69+
const handleRemoveClick = (): void => {
70+
if (handleClickRemove != null) {
71+
handleClickRemove(
72+
fixtureLocation,
73+
cutoutFixtureId,
74+
DEFAULT_AA_FOR_WASTE_CHUTE
75+
)
76+
}
7977
}
8078
return (
8179
<RobotCoordsForeignObject

shared-data/js/fixtures.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import isEqual from 'lodash/isEqual'
22

3-
import {
4-
WASTE_CHUTE_FIXTURES,
5-
WASTE_CHUTE_WITH_FAKE_FIXTURES,
6-
} from '.'
3+
import { WASTE_CHUTE_FIXTURES, WASTE_CHUTE_WITH_FAKE_FIXTURES } from '.'
74
import {
85
A1_ADDRESSABLE_AREA,
96
A2_ADDRESSABLE_AREA,
@@ -706,6 +703,7 @@ export function getAAFixtureDisplayName(
706703
if (addressableAreaId.includes('WasteChute')) {
707704
return 'Waste chute'
708705
}
706+
break
709707
case STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE:
710708
if (addressableAreaId.includes('WasteChute')) {
711709
return 'Waste chute'

0 commit comments

Comments
 (0)