Skip to content

Commit

Permalink
remove duplicate component
Browse files Browse the repository at this point in the history
  • Loading branch information
shlokamin committed Oct 19, 2023
1 parent b89b362 commit 0bfc2fb
Showing 1 changed file with 0 additions and 148 deletions.
148 changes: 0 additions & 148 deletions app/src/organisms/ProtocolDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -560,154 +560,6 @@ export function ProtocolDetails(
/>
</Box>
</Flex>
<Flex
flexDirection={DIRECTION_ROW}
justifyContent={JUSTIFY_SPACE_BETWEEN}
>
<Flex
flex={`0 0 ${SIZE_5}`}
backgroundColor={COLORS.white}
border={`1px solid ${COLORS.medGreyEnabled}`}
borderRadius={BORDERS.radiusSoftCorners}
position={POSITION_RELATIVE}
flexDirection={DIRECTION_ROW}
width="100%"
marginBottom={SPACING.spacing16}
>
<Flex
flexDirection={DIRECTION_COLUMN}
gridGap={SPACING.spacing16}
padding={`${SPACING.spacing16} 0 ${SPACING.spacing16} ${SPACING.spacing16}`}
width="100%"
>
{analysisStatus !== 'loading' &&
mostRecentAnalysis != null &&
mostRecentAnalysis.errors.length > 0 ? (
<ProtocolAnalysisFailure
protocolKey={protocolKey}
errors={mostRecentAnalysis.errors.map(e => e.detail)}
/>
) : null}
<StyledText
css={TYPOGRAPHY.h2SemiBold}
marginBottom={SPACING.spacing16}
data-testid={`ProtocolDetails_${protocolDisplayName}`}
overflowWrap="anywhere"
>
{protocolDisplayName}
</StyledText>
<Flex css={GRID_STYLE}>
<Flex
flexDirection={DIRECTION_COLUMN}
data-testid="ProtocolDetails_creationMethod"
>
<StyledText as="h6" color={COLORS.darkGreyEnabled}>
{t('creation_method')}
</StyledText>
</Flex>

<StyledText as="p">
{analysisStatus === 'loading'
? t('shared:loading')
: creationMethod}
</StyledText>
</Flex>
<Flex
flexDirection={DIRECTION_COLUMN}
data-testid="ProtocolDetails_lastUpdated"
>
<StyledText as="h6" color={COLORS.darkGreyEnabled}>
{t('last_updated')}
</StyledText>
<StyledText as="p">
{analysisStatus === 'loading'
? t('shared:loading')
: format(new Date(modified), 'MMM dd yy HH:mm')}
</StyledText>
</Flex>
<Flex
flexDirection={DIRECTION_COLUMN}
data-testid="ProtocolDetails_lastAnalyzed"
>
<StyledText as="h6" color={COLORS.darkGreyEnabled}>
{t('last_analyzed')}
</StyledText>
<StyledText as="p">
{analysisStatus === 'loading'
? t('shared:loading')
: lastAnalyzed}
</StyledText>
</Flex>
<Flex
css={css`
display: grid;
justify-self: end;
`}
>
<PrimaryButton
onClick={() => handleRunProtocolButtonClick()}
data-testid="ProtocolDetails_runProtocol"
disabled={analysisStatus === 'loading'}
>
{t('start_setup')}
</PrimaryButton>
</Flex>
</Flex>
<Divider marginY={SPACING.spacing16} />
<Flex css={GRID_STYLE}>
<Flex
flexDirection={DIRECTION_COLUMN}
data-testid="ProtocolDetails_author"
>
<StyledText as="h6" color={COLORS.darkGreyEnabled}>
{t('org_or_author')}
</StyledText>
<StyledText
as="p"
marginRight={SPACING.spacing20}
overflowWrap="anywhere"
>
{analysisStatus === 'loading'
? t('shared:loading')
: author}
</StyledText>
</Flex>
<Flex
flexDirection={DIRECTION_COLUMN}
data-testid="ProtocolDetails_description"
>
<StyledText as="h6" color={COLORS.darkGreyEnabled}>
{t('description')}
</StyledText>
{analysisStatus === 'loading' ? (
<StyledText as="p">{t('shared:loading')}</StyledText>
) : null}
{mostRecentAnalysis != null ? (
<ReadMoreContent
metadata={mostRecentAnalysis.metadata}
protocolType={mostRecentAnalysis.config.protocolType}
/>
) : null}
</Flex>
</Flex>
</Flex>
<Box
position={POSITION_RELATIVE}
top={SPACING.spacing2}
right={SPACING.spacing2}
>
<ProtocolOverflowMenu
handleRunProtocol={() =>
setShowChooseRobotToRunProtocolSlideout(true)
}
handleSendProtocolToOT3={() =>
setShowSendProtocolToOT3Slideout(true)
}
storedProtocolData={props}
data-testid="ProtocolDetails_overFlowMenu"
/>
</Box>
</Flex>
<Flex
flexDirection={DIRECTION_ROW}
justifyContent={JUSTIFY_SPACE_BETWEEN}
Expand Down

0 comments on commit 0bfc2fb

Please sign in to comment.