Skip to content

Commit c2a73b9

Browse files
committed
fix: show progress bar instead of blank loading screen during bulk create
setLoading(true) was being called in onCreate, causing the component to return <div>Loading...</div> early and hide the form and progress bar entirely. Users saw a blank screen with no feedback until all requests completed (or indefinitely for large counts like 50,000). The loading state is only meant for edit mode (fetching an existing subscriber's data). Batch creation progress is already tracked separately via createProgress state, which drives the progress bar and button label.
1 parent 56b0948 commit c2a73b9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

frontend/src/pages/SubscriberCreate/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ function SubscriberCreate() {
141141
const total = subscription.userNumber!;
142142
setCreateErrors([]);
143143
setCreateProgress({ current: 0, total });
144-
setLoading(true);
144+
// NOTE: do NOT set setLoading(true) here — loading is only for edit mode
145+
// (fetching existing subscriber). Setting it here causes the component to
146+
// return <div>Loading...</div> which hides the form and progress bar.
145147

146148
// Build the full list of (supi, payload) pairs upfront so the loop body
147149
// is free of mutation side effects.
@@ -187,7 +189,6 @@ function SubscriberCreate() {
187189
setCreateProgress({ current: completed, total });
188190
}
189191

190-
setLoading(false);
191192
setCreateProgress(null);
192193

193194
if (errors.length > 0) {

0 commit comments

Comments
 (0)