Skip to content

Commit

Permalink
module selection changes & check js error resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
akshay-dighe committed May 15, 2023
1 parent a551a4e commit 95e9d96
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ const SelectedModules = (props: { propsData: any }): JSX.Element => {
<Flex
flexDirection={DIRECTION_COLUMN}
marginLeft={SPACING.spacing4}
marginTop={SPACING.spacing3}
marginTop={SPACING.spacing4}
marginBottom={SPACING.spacing4}
>
<StyledText as="h4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const unselectedOptionStyles = css`
background-color: ${COLORS.white};
border: 1px solid ${COLORS.medGreyEnabled};
border-radius: ${BORDERS.radiusSoftCorners};
padding: ${SPACING.spacing3};
padding: ${SPACING.spacing4};
width: 100%;
cursor: pointer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function FlexModulesComponent(): JSX.Element {
<Flex
flexDirection={DIRECTION_COLUMN}
marginLeft={SPACING.spacing4}
marginTop={SPACING.spacing3}
marginTop={SPACING.spacing4}
marginBottom={SPACING.spacing4}
>
<StyledText as="h4">{label}</StyledText>
Expand Down
9 changes: 8 additions & 1 deletion protocol-designer/src/components/modules/ModuleDiagram.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,15 @@ interface Props {
model: ModuleModel
}

export type NewModuleType =
| typeof MAGNETIC_MODULE_TYPE
| typeof TEMPERATURE_MODULE_TYPE
| typeof THERMOCYCLER_MODULE_TYPE
| typeof HEATERSHAKER_MODULE_TYPE
| typeof GRIPPER_MODULE_TYPE

type ModuleImg = {
[type in ModuleType]: {
[type in NewModuleType]: {
[model in ModuleModel]?: string
}
}
Expand Down
13 changes: 8 additions & 5 deletions protocol-designer/src/containers/ConnectedMainPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,22 @@ interface Props {
page: Page
selectedTerminalItemId: TerminalItemId | null | undefined
ingredSelectionMode: boolean
robot: string
robot: string | null | undefined
}

function MainPanelComponent(props: Props): JSX.Element {
const { page, selectedTerminalItemId, ingredSelectionMode, robot } = props

const compo =
robot === 'ot2_standard' ? <ConnectedFilePage /> : <FlexFileDetails />
const fileComponent =
!robot || robot === 'ot2_standard' ? (
<ConnectedFilePage />
) : (
<FlexFileDetails />
)
switch (page) {
case 'file-splash':
return <Splash />
case 'file-detail':
return compo
return fileComponent
case 'liquids':
return <LiquidsPage />
case 'settings-app':
Expand Down

0 comments on commit 95e9d96

Please sign in to comment.