Skip to content

Commit

Permalink
Code review cleanup comments
Browse files Browse the repository at this point in the history
  • Loading branch information
smb2268 committed Mar 26, 2024
1 parent 829804d commit 5292830
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
13 changes: 4 additions & 9 deletions app/src/organisms/Devices/PipetteCard/FlexPipetteCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ import { DropTipWizard } from '../../DropTipWizard'

import { AboutPipetteSlideout } from './AboutPipetteSlideout'

import type {
BadPipette,
Mount,
PipetteData,
HostConfig,
} from '@opentrons/api-client'
import type { BadPipette, Mount, PipetteData } from '@opentrons/api-client'
import type { PipetteModelSpecs } from '@opentrons/shared-data'
import type {
PipetteWizardFlow,
Expand Down Expand Up @@ -66,7 +61,7 @@ export function FlexPipetteCard({
isEstopNotDisengaged,
}: FlexPipetteCardProps): JSX.Element {
const { t, i18n } = useTranslation(['device_details', 'shared'])
const host = useHost() as HostConfig
const host = useHost()

const [
showAboutPipetteSlideout,
Expand Down Expand Up @@ -258,15 +253,15 @@ export function FlexPipetteCard({
closeFlow={() => setShowDropTipWizard(false)}
/>
) : null}
{attachedPipette?.ok && showAboutPipetteSlideout && (
{attachedPipette?.ok && showAboutPipetteSlideout ? (
<AboutPipetteSlideout
pipetteId={attachedPipette.serialNumber}
pipetteName={pipetteDisplayName ?? attachedPipette.instrumentName}
firmwareVersion={attachedPipette.firmwareVersion}
isExpanded={showAboutPipetteSlideout}
onCloseClick={() => setShowAboutPipetteSlideout(false)}
/>
)}
) : null}
{showChoosePipette ? (
<ChoosePipette
proceed={handleAttach}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { describe, it, vi, beforeEach, afterEach, expect } from 'vitest'
import { renderWithProviders } from '../../../../__testing-utils__'
import { useCurrentSubsystemUpdateQuery } from '@opentrons/react-api-client'
import { i18n } from '../../../../i18n'
import { mockLeftSpecs } from '../../../../redux/pipettes/__fixtures__'
import { handlePipetteWizardFlows } from '../../../PipetteWizardFlows'
import { AboutPipetteSlideout } from '../AboutPipetteSlideout'
import { FlexPipetteCard } from '../FlexPipetteCard'
import { ChoosePipette } from '../../../PipetteWizardFlows/ChoosePipette'
import { DropTipWizard } from '../../../DropTipWizard'

import type { PipetteData } from '@opentrons/api-client'
import { mockLeftSpecs } from '../../../../redux/pipettes/__fixtures__'

vi.mock('../../../PipetteWizardFlows')
vi.mock('../../../PipetteWizardFlows/ChoosePipette')
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/Devices/PipetteCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const PipetteCard = (props: PipetteCardProps): JSX.Element => {
pipetteSpecs={pipetteModelSpecs}
mount={mount}
transform="scale(0.3)"
transformOrigin={'20% 52%'}
transformOrigin="20% 52%"
/>
</Flex>
) : null}
Expand Down

0 comments on commit 5292830

Please sign in to comment.