Skip to content

Commit

Permalink
fix: skip toast if no data is available for stats
Browse files Browse the repository at this point in the history
Signed-off-by: SoulHarsh007 <[email protected]>
  • Loading branch information
SoulHarsh007 committed Apr 30, 2024
1 parent 4fdb17f commit 0c4da22
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/Statistics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ export default function Statistics({
);
useEffect(() => {
const querySubscription = query.$.subscribe(packages => {
if (!packages.length) {
return;
}
const id = toast.loading('Updating statistics...');
handleStats(packages, computedStats => setStats(computedStats));
toast.update(id, {
Expand Down

1 comment on commit 0c4da22

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for builder-dashboard ready!

✅ Preview
https://builder-dashboard-9dl8vnglp-vnepogodins-projects.vercel.app

Built with commit 0c4da22.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.