diff --git a/app/src/components/InstrumentSettings/AttachedModulesCard.js b/app/src/components/InstrumentSettings/AttachedModulesCard.js index 81b5ab621f3..6f56dd5ba23 100644 --- a/app/src/components/InstrumentSettings/AttachedModulesCard.js +++ b/app/src/components/InstrumentSettings/AttachedModulesCard.js @@ -6,6 +6,7 @@ import {connect} from 'react-redux' import {RefreshCard} from '@opentrons/components' import {fetchModules, makeGetRobotModules} from '../../http-api-client' import ModulesCardContents from './ModulesCardContents' +import {getConfig} from '../../config' import type {State, Dispatch} from '../../types' import type {Module} from '../../http-api-client' @@ -16,6 +17,7 @@ type OP = Robot type SP = {| modules: ?Array, refreshing: boolean, + __featureEnabled: boolean, |} type DP = {|refresh: () => mixed|} @@ -38,7 +40,10 @@ function AttachedModulesCard (props: Props) { refresh={props.refresh} column > - + ) } @@ -50,10 +55,10 @@ function makeSTP (): (state: State, ownProps: OP) => SP { const modulesCall = getRobotModules(state, ownProps) const modulesResponse = modulesCall.response const modules = modulesResponse && modulesResponse.modules - return { modules: modules, refreshing: modulesCall.inProgress, + __featureEnabled: !!getConfig(state).devInternal?.enableThermocycler, } } } diff --git a/app/src/components/InstrumentSettings/ModulesCardContents.js b/app/src/components/InstrumentSettings/ModulesCardContents.js index fee10e608de..004e61eb710 100644 --- a/app/src/components/InstrumentSettings/ModulesCardContents.js +++ b/app/src/components/InstrumentSettings/ModulesCardContents.js @@ -5,15 +5,17 @@ import ModuleItem, {NoModulesMessage} from '../ModuleItem' type Props = { modules: ?Array, + showThermo: boolean, } export default function ModulesCardContents (props: Props) { - if (!props.modules || !props.modules[0]) return () + const {modules, showThermo} = props + if (!modules || !modules[0] || !showThermo) return return ( - {props.modules.map((mod, index) => ( - + {modules.map((mod, index) => ( + ))} ) diff --git a/app/src/components/ModuleItem/ModuleImage.js b/app/src/components/ModuleItem/ModuleImage.js index 71cd84c7ea0..71d7c8ac3a4 100644 --- a/app/src/components/ModuleItem/ModuleImage.js +++ b/app/src/components/ModuleItem/ModuleImage.js @@ -11,7 +11,7 @@ export default function ModuleImage (props: Props) { const imgSrc = getModuleImg(props.name) return (
- +
) } @@ -23,4 +23,5 @@ function getModuleImg (name: string) { const MODULE_IMGS = { tempdeck: require('./images/module-temp@3x.png'), magdeck: require('./images/module-mag@3x.png'), + thermocycler: require('./images/module-thermo@3x.png'), } diff --git a/app/src/components/ModuleItem/images/module-thermo@3x.png b/app/src/components/ModuleItem/images/module-thermo@3x.png new file mode 100644 index 00000000000..0e50c88a5c4 Binary files /dev/null and b/app/src/components/ModuleItem/images/module-thermo@3x.png differ diff --git a/app/src/config/index.js b/app/src/config/index.js index 8b2a083bc90..a452814577f 100644 --- a/app/src/config/index.js +++ b/app/src/config/index.js @@ -66,6 +66,7 @@ export type Config = { devInternal?: { allPipetteConfig?: boolean, manualIp?: boolean, + enableThermocycler?: boolean, }, }