Skip to content

Commit

Permalink
fallback count added for subscribers and notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitmalhotra1420 committed Dec 23, 2024
1 parent 4f5e05f commit 9d644b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions components/Dashboard/LineChartSet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ export default function LineChartSet() {
}
};

const fallbackNotificationsNumber = 139000000;

const fallbackSubscriberCount = 300000;
return (
<>
<Grid
Expand Down Expand Up @@ -239,15 +242,17 @@ export default function LineChartSet() {
data={notificationData}
max={max}
min={min}
total={totalNotifications}
total={
totalNotifications || fallbackNotificationsNumber.toLocaleString()
}
/>
<HorizontalLine />
<Subscribers
isLoading={isStatisticDataLoading}
data={subscriberData}
max={max}
min={min}
total={totalSubscribers}
total={totalSubscribers || fallbackSubscriberCount.toLocaleString()}
/>
<HorizontalBarChart
title="Subscribers By Channel"
Expand Down
3 changes: 2 additions & 1 deletion components/Dashboard/OverViewSet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default function OverViewSet() {
const { isDarkMode } = getTheme();
const isMobile = useMediaQuery('(max-width:480px)');

const fallbackNotificationNumber = 139000000;
const overViewData = [
{
image: !isDarkMode ? IntegrationLightIcon : IntegrationDarkIcon,
Expand All @@ -63,7 +64,7 @@ export default function OverViewSet() {
{
image: !isDarkMode ? NotificationsLightIcon : NotificationsDarkIcon,
title: 'Notifications Sent',
value: notifiactionsSent,
value: notifiactionsSent || fallbackNotificationNumber.toLocaleString(),
size: 41,
},
];
Expand Down

0 comments on commit 9d644b9

Please sign in to comment.