File tree 2 files changed +15
-5
lines changed
2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -152,9 +152,6 @@ export default function Menu() {
152
152
server . isStudent ( ) . then ( ( v ) => ( ) => setIsStudent ( v ) ) ,
153
153
server . isChargebeeCustomer ( ) . then ( ( v ) => ( ) => setIsChargebeeCustomer ( v ) ) ,
154
154
] ) . then ( ( setters ) => setters . forEach ( ( s ) => s ( ) ) ) ;
155
-
156
- // Refresh billing mode
157
- refreshUserBillingMode ( ) ;
158
155
} , [ ] ) ;
159
156
160
157
useEffect ( ( ) => {
@@ -163,6 +160,11 @@ export default function Menu() {
163
160
}
164
161
} , [ team ] ) ;
165
162
163
+ useEffect ( ( ) => {
164
+ // Refresh billing mode
165
+ refreshUserBillingMode ( ) ;
166
+ } , [ teams ] ) ;
167
+
166
168
const teamOrUserSlug = ! ! team ? "/t/" + team . slug : "/projects" ;
167
169
const leftMenu : Entry [ ] = ( ( ) => {
168
170
// Project menu
Original file line number Diff line number Diff line change @@ -315,8 +315,16 @@ export default function TeamBilling() {
315
315
title = "Billing"
316
316
subtitle = "Manage team billing and plans."
317
317
>
318
- { showUBP && < TeamUsageBasedBilling /> }
319
- { ! showUBP && renderTeamBilling ( ) }
318
+ { userBillingMode === undefined ? (
319
+ < div className = "p-20" >
320
+ < Spinner className = "h-5 w-5 animate-spin" />
321
+ </ div >
322
+ ) : (
323
+ < >
324
+ { showUBP && < TeamUsageBasedBilling /> }
325
+ { ! showUBP && renderTeamBilling ( ) }
326
+ </ >
327
+ ) }
320
328
</ PageWithSubMenu >
321
329
) ;
322
330
}
You can’t perform that action at this time.
0 commit comments