Skip to content

Commit

Permalink
hide liquiddefinitions liquidclasses behind ff
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdiehl11 committed Dec 17, 2024
1 parent 608548a commit e6b2407
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'
import {
ALIGN_CENTER,
DIRECTION_COLUMN,
Expand All @@ -12,6 +13,7 @@ import {
Tag,
} from '@opentrons/components'
import { LINE_CLAMP_TEXT_STYLE } from '../../atoms'
import { getEnableLiquidClasses } from '../../feature-flags/selectors'

import type { AllIngredGroupFields } from '../../labware-ingred/types'

Expand All @@ -23,6 +25,7 @@ export function LiquidDefinitions({
allIngredientGroupFields,
}: LiquidDefinitionsProps): JSX.Element {
const { t } = useTranslation('protocol_overview')
const enableLiquidClasses = useSelector(getEnableLiquidClasses)

return (
<Flex flexDirection={DIRECTION_COLUMN} gridGap={SPACING.spacing12}>
Expand Down Expand Up @@ -60,7 +63,9 @@ export function LiquidDefinitions({
flexDirection={DIRECTION_COLUMN}
gridGap={SPACING.spacing4}
>
{liquid.description || liquid.liquidClass == null ? (
{liquid.description ||
liquid.liquidClass == null ||
!enableLiquidClasses ? (
<StyledText
desktopStyle="bodyDefaultRegular"
css={LINE_CLAMP_TEXT_STYLE(10)}
Expand All @@ -70,7 +75,7 @@ export function LiquidDefinitions({
: t('na')}
</StyledText>
) : null}
{liquid.liquidClass != null ? (
{liquid.liquidClass && enableLiquidClasses ? (
<Tag
text={liquid.liquidClass}
type="default"
Expand Down

0 comments on commit e6b2407

Please sign in to comment.