Skip to content

Commit

Permalink
feat: static link to archived flags in archived project (#7913)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Aug 19, 2024
1 parent 7008070 commit 2050cb0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const StyledDivHeader = styled('div')(({ theme }) => ({
...flexRow,
width: '100%',
marginBottom: theme.spacing(2),
gap: theme.spacing(1),
}));

export const StyledCardTitle = styled('h3')(({ theme }) => ({
Expand Down Expand Up @@ -89,7 +90,7 @@ export const StyledIconBox = styled(Box)(({ theme }) => ({
display: 'grid',
placeItems: 'center',
padding: theme.spacing(0, 0.5, 0, 1),
marginRight: theme.spacing(2),
marginRight: theme.spacing(1),
alignSelf: 'baseline',
color: theme.palette.primary.main,
height: '100%',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,25 +103,12 @@ export const ProjectArchiveCard: FC<ProjectArchiveCardProps> = ({
</Tooltip>
}
/>
<ConditionallyRender
condition={typeof archivedFeaturesCount !== 'undefined'}
show={
<Link
component={RouterLink}
to={`/archive?search=project%3A${encodeURI(id)}`}
>
<StyledParagraphInfo disabled data-loading>
{archivedFeaturesCount}
</StyledParagraphInfo>
<p data-loading>
archived{' '}
{archivedFeaturesCount === 1
? 'flag'
: 'flags'}
</p>
</Link>
}
/>
<Link
component={RouterLink}
to={`/archive?search=project%3A${encodeURI(id)}`}
>
<p>View archived flags</p>
</Link>
</StyledDivInfo>
</StyledProjectCardBody>
<ProjectCardFooter id={id} disabled owners={owners}>
Expand Down

0 comments on commit 2050cb0

Please sign in to comment.