Skip to content

A local-first personal finance app

fix(crossover-report): render empty state when no accounts exist (#8512) (#8523)

Gaurav Yadav4bcc021470cd
diff --git a/packages/desktop-client/src/components/reports/reports/Crossover.tsx b/packages/desktop-client/src/components/reports/reports/Crossover.tsx
index 79ebb0a32f..021e180af1 100644
--- a/packages/desktop-client/src/components/reports/reports/Crossover.tsx
+++ b/packages/desktop-client/src/components/reports/reports/Crossover.tsx
@@ -125,7 +125,7 @@ function CrossoverInner({ widget }: CrossoverInnerProps) {
// initialize once when data is available
useEffect(() => {
- if (selectionsInitialized || accounts.length === 0 || isCategoriesLoading) {
+ if (selectionsInitialized || isCategoriesLoading) {
return;
}
@@ -419,14 +419,7 @@ function CrossoverInner({ widget }: CrossoverInnerProps) {
});
};
- if (
- !allMonths ||
- !displayData ||
- !start ||
- !end ||
- isCategoriesLoading ||
- accounts.length === 0
- ) {
+ if (!allMonths || !displayData || !start || !end || isCategoriesLoading) {
return <LoadingIndicator />;
}
diff --git a/upcoming-release-notes/8523.md b/upcoming-release-notes/8523.md
new file mode 100644
index 0000000000..2695a4b6af
--- /dev/null
+++ b/upcoming-release-notes/8523.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [MeGaurav4]
+---
+
+Fix crossover reports showing an infinite loading spinner when the budget has no accounts