Skip to content

Commit

Permalink
refactor(app): hoist getLabwareDefsFromCommands outside of each proto…
Browse files Browse the repository at this point in the history
…col command text
  • Loading branch information
mjhuff committed Oct 14, 2024
1 parent 83cec18 commit 92c8801
Show file tree
Hide file tree
Showing 35 changed files with 301 additions and 73 deletions.
7 changes: 6 additions & 1 deletion app/src/molecules/Command/Command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import {
SPACING,
RESPONSIVENESS,
} from '@opentrons/components'
import type { RobotType, RunTimeCommand } from '@opentrons/shared-data'
import type {
LabwareDefinition2,
RobotType,
RunTimeCommand,
} from '@opentrons/shared-data'
import { CommandText } from './CommandText'
import { CommandIcon } from './CommandIcon'
import type { CommandTextData } from './types'
Expand All @@ -34,6 +38,7 @@ interface SkeletonCommandProps extends FundamentalProps {
interface NonSkeletonCommandProps extends FundamentalProps {
state: NonSkeletonCommandState
command: RunTimeCommand
allRunDefs: LabwareDefinition2[]
commandTextData: CommandTextData
}

Expand Down
7 changes: 6 additions & 1 deletion app/src/molecules/Command/CommandText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ import {

import { useCommandTextString } from './hooks'

import type { RobotType, RunTimeCommand } from '@opentrons/shared-data'
import type {
LabwareDefinition2,
RobotType,
RunTimeCommand,
} from '@opentrons/shared-data'
import type { StyleProps } from '@opentrons/components'
import type { CommandTextData } from './types'
import type {
Expand All @@ -36,6 +40,7 @@ type STProps = LegacySTProps | ModernSTProps

interface BaseProps extends StyleProps {
command: RunTimeCommand
allRunDefs: LabwareDefinition2[]
commandTextData: CommandTextData
robotType: RobotType
isOnDevice?: boolean
Expand Down
Loading

0 comments on commit 92c8801

Please sign in to comment.