1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

feat: static link to archived flags in archived project (#7913)

This commit is contained in:
Mateusz Kwasniewski 2024-08-19 11:24:39 +02:00 committed by GitHub
parent 7008070fc1
commit 2050cb0b76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 20 deletions

View File

@ -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 }) => ({
@ -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%',

View File

@ -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}>