Skip to content

Commit

Permalink
clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
koji committed Dec 17, 2024
1 parent 740f35f commit 7e7a9b9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions protocol-designer/src/organisms/EditNavigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ export function EditNavigation({
const dispatch = useDispatch()
const isLiquidsPage = location.pathname === '/liquids'

const showProtocolEditButtons = !(hasZoomInSlot || isLiquidsPage)
const showProtocolEditButtons = !(hasZoomInSlot === true || isLiquidsPage)

let metadataText = t('edit_protocol')
if (isLiquidsPage) {
metadataText = t('add_liquid')
} else if (hasZoomInSlot) {
} else if (hasZoomInSlot === true) {
metadataText = t('add_hardware_labware')
}
return (
Expand Down Expand Up @@ -79,7 +79,7 @@ export function EditNavigation({
{isLiquidsPage ? null : (
<SecondaryButton
onClick={() => {
if (hasTrashEntity) {
if (hasTrashEntity === true) {
navigate('/overview')
dispatch(selectTerminalItem('__initial_setup__'))
} else {
Expand All @@ -103,7 +103,7 @@ const NavContainer = styled(Flex)<{ showShadow: boolean }>`
justify-content: ${JUSTIFY_SPACE_BETWEEN};
align-items: ${ALIGN_CENTER};
box-shadow: ${props =>
props.showShadow
props.showShadow === true
? `0px 1px 3px 0px ${COLORS.black90}${COLORS.opacity20HexCode}`
: 'none'};
`
Expand All @@ -117,7 +117,7 @@ const MetadataContainer = styled.div.withConfig<MetadataProps>({
display: flex;
flex-direction: ${DIRECTION_COLUMN};
text-align: ${props =>
props.showProtocolEditButtons === true
props.showProtocolEditButtons
? TYPOGRAPHY.textAlignCenter
: TYPOGRAPHY.textAlignLeft};
Expand Down

0 comments on commit 7e7a9b9

Please sign in to comment.