Skip to content

Commit

Permalink
refactor out arrow functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Jan 25, 2024
1 parent 1ab6f3a commit 2e0d3d4
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface LabwareOnDeckProps {
y: number
}

export const LabwareOnDeck = (props: LabwareOnDeckProps): JSX.Element => {
export function LabwareOnDeck(props: LabwareOnDeckProps): JSX.Element {
const { labwareOnDeck, x, y, className } = props
const missingTipsByLabwareId = useSelector(
tipContentsSelectors.getMissingTipsByLabwareId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ interface EditLabwareOffDeckProps {
labwareEntity: LabwareEntity
}

export const EditLabwareOffDeck = (
export function EditLabwareOffDeck(
props: EditLabwareOffDeckProps
): JSX.Element => {
): JSX.Element {
const { labwareEntity } = props
const { t } = useTranslation('deck')
const dispatch = useDispatch<ThunkDispatch<any>>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface LabwareNameProps {
labwareOnDeck: LabwareOnDeck
}

export const LabwareName = (props: LabwareNameProps): JSX.Element => {
export function LabwareName(props: LabwareNameProps): JSX.Element {
const { labwareOnDeck } = props
const nicknames = useSelector(uiLabwareSelectors.getLabwareNicknamesById)
const nickname = nicknames[labwareOnDeck.id]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface NameThisLabwareProps {
editLiquids: () => void
}

export const NameThisLabware = (props: NameThisLabwareProps): JSX.Element => {
export function NameThisLabware(props: NameThisLabwareProps): JSX.Element {
const { labwareOnDeck } = props
const dispatch: ThunkDispatch<any> = useDispatch()
const [inputValue, setInputValue] = React.useState<string>('')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const getLabwareIsRecommended = (
: false
}
}
export const LabwareSelectionModal = (): JSX.Element | null => {
export function LabwareSelectionModal(): JSX.Element | null {
const { t } = useTranslation(['modules', 'modal', 'button', 'alert'])
const dispatch = useDispatch<ThunkDispatch<any>>()
const selectedLabwareSlot = useSelector(
Expand Down
2 changes: 1 addition & 1 deletion protocol-designer/src/components/LiquidPlacementModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { WellSelectionInstructions } from './WellSelectionInstructions'

import styles from './LiquidPlacementModal.css'

export const LiquidPlacementModal = (): JSX.Element => {
export function LiquidPlacementModal(): JSX.Element {
const [highlightedWells, setHighlightedWells] = React.useState<
WellGroup | {}
>({})
Expand Down
2 changes: 1 addition & 1 deletion protocol-designer/src/components/SelectionRect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface SelectionRectProps {
originYOffset?: number
}

export const SelectionRect = (props: SelectionRectProps): JSX.Element => {
export function SelectionRect(props: SelectionRectProps): JSX.Element {
const {
onSelectionMove,
onSelectionDone,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Portal } from '../../portals/MainPageModalPortal'
import styles from '../SettingsPage.css'
import modalStyles from '../../modals/modal.css'

export const FeatureFlagCard = (): JSX.Element => {
export function FeatureFlagCard(): JSX.Element {
const flags = useSelector(featureFlagSelectors.getFeatureFlagData)
const dispatch = useDispatch()

Expand Down
2 changes: 1 addition & 1 deletion protocol-designer/src/components/SettingsPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { SettingsApp } from './SettingsApp'

export { SettingsSidebar } from './SettingsSidebar'

export const SettingsPage = (): JSX.Element => {
export function SettingsPage(): JSX.Element {
const currentPage = useSelector(selectors.getCurrentPage)
switch (currentPage) {
// TODO: Ian 2019-08-21 when we have other pages, put them here
Expand Down

0 comments on commit 2e0d3d4

Please sign in to comment.