Skip to content

Commit

Permalink
Merge pull request #57 from push-protocol/fallback-ui
Browse files Browse the repository at this point in the history
Fallback count for subscribers and notifications.
  • Loading branch information
rohitmalhotra1420 authored Dec 23, 2024
2 parents dfe4b1f + 9d644b9 commit f3c753a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,10 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
Binary file removed .yarn/install-state.gz
Binary file not shown.
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 f3c753a

Please sign in to comment.