Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1-3093: round the project health #8718

Merged
merged 4 commits into from
Nov 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const ProjectHealth = () => {
const {
data: { averageHealth },
} = useProjectStatus(projectId);
const averageHealthRounded = Math.round(averageHealth);
thomasheartman marked this conversation as resolved.
Show resolved Hide resolved
const { isOss } = useUiConfig();
const theme = useTheme();
const radius = 40;
Expand All @@ -41,7 +42,7 @@ export const ProjectHealth = () => {
const gapLength = 0.3;
const filledLength = 1 - gapLength;
const offset = 0.75 - gapLength / 2;
const healthLength = (averageHealth / 100) * circumference * 0.7;
const healthLength = (averageHealthRounded / 100) * circumference * 0.7;

return (
<HealthContainer>
Expand Down Expand Up @@ -75,12 +76,12 @@ export const ProjectHealth = () => {
fill={theme.palette.text.primary}
fontSize='24px'
>
{averageHealth}%
{averageHealthRounded}%
</text>
</StyledSVG>
<Typography variant='body2'>
On average, your project health has remained at{' '}
{averageHealth}% the last 4 weeks
{averageHealthRounded}% the last 4 weeks
</Typography>
</ChartRow>
<DescriptionText variant='body2'>
Expand Down
Loading