1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

Remove member count for default project (#2131)

* Remove member count from default project

* Remove dependencies
This commit is contained in:
sjaanus 2022-10-05 10:51:47 +02:00 committed by GitHub
parent e30b830305
commit 774d4234bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 36 deletions

View File

@ -16,6 +16,7 @@ import {
AccordionSummary,
} from '@mui/material';
import { UPDATE_PROJECT } from 'component/providers/AccessProvider/permissions';
import { DEFAULT_PROJECT_ID } from '../../../../hooks/api/getters/useDefaultProject/useDefaultProjectId';
interface IProjectInfoProps {
id: string;
@ -125,7 +126,6 @@ const ProjectInfo = ({
<p>projectId: {id}</p>
</div>
</div>
<div className={styles.infoSection}>
<div data-loading className={styles.percentageContainer}>
<PercentageCircle percentage={health} />
@ -154,35 +154,39 @@ const ProjectInfo = ({
/>
</Link>
</div>
<div
className={styles.infoSection}
style={{ marginBottom: '0' }}
>
<p className={styles.subtitle} data-loading>
Project members
</p>
<p data-loading className={styles.emphazisedText}>
{memberCount}
</p>
<Link
data-loading
className={classnames(
themeStyles.flexRow,
themeStyles.justifyCenter,
styles.infoLink
)}
to={link}
>
<span className={styles.linkText} data-loading>
view more{' '}
</span>
<ArrowForwardIcon
data-loading
className={styles.arrowIcon}
/>
</Link>
</div>
<ConditionallyRender
condition={id !== DEFAULT_PROJECT_ID}
show={
<div
className={styles.infoSection}
style={{ marginBottom: '0' }}
>
<p className={styles.subtitle} data-loading>
Project members
</p>
<p data-loading className={styles.emphazisedText}>
{memberCount}
</p>
<Link
data-loading
className={classnames(
themeStyles.flexRow,
themeStyles.justifyCenter,
styles.infoLink
)}
to={link}
>
<span className={styles.linkText} data-loading>
view more{' '}
</span>
<ArrowForwardIcon
data-loading
className={styles.arrowIcon}
/>
</Link>
</div>
}
/>
</div>
</aside>
);

View File

@ -15,6 +15,7 @@ import AccessContext from 'contexts/AccessContext';
import { DEFAULT_PROJECT_ID } from 'hooks/api/getters/useDefaultProject/useDefaultProjectId';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { DeleteProjectDialogue } from '../Project/DeleteProject/DeleteProjectDialogue';
import { ConditionallyRender } from '../../common/ConditionallyRender/ConditionallyRender';
interface IProjectCardProps {
name: string;
@ -120,12 +121,17 @@ export const ProjectCard = ({
<p data-loading>health</p>
</div>
<div className={classes.infoBox}>
<p className={classes.infoStats} data-loading>
{memberCount}
</p>
<p data-loading>members</p>
</div>
<ConditionallyRender
condition={id !== DEFAULT_PROJECT_ID}
show={
<div className={classes.infoBox}>
<p className={classes.infoStats} data-loading>
{memberCount}
</p>
<p data-loading>members</p>
</div>
}
/>
</div>
<DeleteProjectDialogue
project={id}