Skip to content

Commit

Permalink
fix(app): add grey square for stale and error protocol map (#15016)
Browse files Browse the repository at this point in the history
  • Loading branch information
smb2268 authored and Carlos-fernandez committed May 20, 2024
1 parent b820856 commit b7a1b7f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
28 changes: 18 additions & 10 deletions app/src/organisms/ChooseProtocolSlideout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -526,19 +526,27 @@ function StoredProtocolList(props: StoredProtocolListProps): JSX.Element {
onClick={() => handleSelectProtocol(storedProtocol)}
>
<Box display="grid" gridTemplateColumns="1fr 3fr">
<Box
marginY={SPACING.spacingAuto}
backgroundColor={isSelected ? COLORS.white : 'inherit'}
marginRight={SPACING.spacing16}
height="4.25rem"
width="4.75rem"
>
{!missingAnalysisData ? (
{!missingAnalysisData ? (
<Box
marginY={SPACING.spacingAuto}
backgroundColor={isSelected ? COLORS.white : 'inherit'}
marginRight={SPACING.spacing16}
height="4.25rem"
width="4.75rem"
>
<ProtocolDeck
protocolAnalysis={storedProtocol.mostRecentAnalysis}
/>
) : null}
</Box>
</Box>
) : (
<Box
height="4.25rem"
width="4.75rem"
marginRight={SPACING.spacing16}
backgroundColor={COLORS.grey30}
borderRadius={SPACING.spacing8}
/>
)}
<StyledText
as="p"
fontWeight={TYPOGRAPHY.fontWeightSemiBold}
Expand Down
16 changes: 14 additions & 2 deletions app/src/organisms/ProtocolsLanding/ProtocolCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,20 @@ function AnalysisInfo(props: AnalysisInfoProps): JSX.Element {
size={SIZE_3}
/>
),
error: <Box size="6rem" backgroundColor={COLORS.grey30} />,
stale: <Box size="6rem" backgroundColor={COLORS.grey30} />,
error: (
<Box
size="6rem"
backgroundColor={COLORS.grey30}
borderRadius={SPACING.spacing8}
/>
),
stale: (
<Box
size="6rem"
backgroundColor={COLORS.grey30}
borderRadius={SPACING.spacing8}
/>
),
complete:
mostRecentAnalysis != null ? (
<ProtocolDeck protocolAnalysis={mostRecentAnalysis} />
Expand Down

0 comments on commit b7a1b7f

Please sign in to comment.