Skip to content

Commit 742207c

Browse files
authored
Fix Get started Billing form edit button not working (#3759)
1 parent ec3405b commit 742207c

File tree

1 file changed

+9
-3
lines changed
  • apps/dashboard/src/components/settings/Account/Billing

1 file changed

+9
-3
lines changed

apps/dashboard/src/components/settings/Account/Billing/index.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,18 @@ export const Billing: React.FC<BillingProps> = ({ account }) => {
202202
// eslint-disable-next-line no-restricted-syntax
203203
useEffect(() => {
204204
if (account) {
205-
const paymentCompleted = validPayment;
206-
207205
setStepsCompleted({
208206
account: !!account.email,
209-
payment: paymentCompleted,
207+
payment: validPayment,
210208
});
209+
}
210+
}, [validPayment, account]);
211+
212+
// FIXME: this entire flow needs to be re-worked
213+
// eslint-disable-next-line no-restricted-syntax
214+
useEffect(() => {
215+
if (account) {
216+
const paymentCompleted = validPayment;
211217

212218
if (paymentCompleted && paymentMethodSaving) {
213219
// user chose a growth plan before adding a payment method,

0 commit comments

Comments
 (0)