diff --git a/web-server/src/content/DoraMetrics/DoraCards/WeeklyDeliveryVolumeCard.tsx b/web-server/src/content/DoraMetrics/DoraCards/WeeklyDeliveryVolumeCard.tsx
index 791d490a..a5d1eee5 100644
--- a/web-server/src/content/DoraMetrics/DoraCards/WeeklyDeliveryVolumeCard.tsx
+++ b/web-server/src/content/DoraMetrics/DoraCards/WeeklyDeliveryVolumeCard.tsx
@@ -12,7 +12,6 @@ import {
NoDataImg
} from '@/content/DoraMetrics/DoraCards/sharedComponents';
import { useAuth } from '@/hooks/useAuth';
-import { useCountUp } from '@/hooks/useCountUp';
import {
useCurrentDateRangeLabel,
useStateDateConfig
@@ -56,10 +55,6 @@ export const WeeklyDeliveryVolumeCard = () => {
const dateRangeLabel = useCurrentDateRangeLabel();
const deploymentFrequencyProps = useAvgIntervalBasedDeploymentFrequency();
- const deploymentFrequencyCount = useCountUp(
- deploymentFrequencyProps.count || 0
- );
-
const { addPage } = useOverlayPage();
const deploymentsConfigured = true;
const isCodeProviderIntegrationEnabled = integrationSet.has(
@@ -209,11 +204,12 @@ export const WeeklyDeliveryVolumeCard = () => {
color={deploymentFrequencyProps.color}
sx={{ fontSize: '3em' }}
>
- {deploymentFrequencyProps.count ? (
- `${deploymentFrequencyCount}`
- ) : (
- No Deployments
- )}
+
+ {getDeploymentCountString(
+ deploymentFrequencyProps.count,
+ totalDeployments
+ )}
+
{Boolean(
deploymentFrequencyProps.count ||
@@ -319,3 +315,11 @@ export const WeeklyDeliveryVolumeCard = () => {
);
};
+
+const getDeploymentCountString = (count: number, totalDeployments: number) => {
+ if (totalDeployments === 0) return 'No Deployments';
+ if (count) return `${count}`;
+
+ // backend doesn't send decimals, so if total deps exist, count cannot be zero, it's less than 1
+ return '<1';
+};