Skip to content

Commit 92cfc69

Browse files
committed
chore: PR feedback
1 parent 7073fa0 commit 92cfc69

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/StatefulButton/StatefulSubscribeButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const StatefulSubscribeButton = () => {
100100
}
101101
};
102102

103-
// Refetch the checkout intent if the polled intent state changes.
103+
// Visually alter the Subscribe button to a "successful" appearance if the polled intent state becomes successful.
104104
useEffect(() => {
105105
if (statefulButtonState === 'pending' && determineExistingSuccessfulCheckoutIntent(polledCheckoutIntent?.state)) {
106106
setStatefulButtonState('success');

src/components/app/routes/loaders/checkoutStepperLoader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,15 @@ async function billingDetailsSuccessLoader(queryClient: QueryClient): Promise<Re
160160
);
161161
}
162162

163-
const checkoutIntentType = checkoutFormStore.getState().checkoutSessionStatus?.type;
163+
const stripeCheckoutSessionType = checkoutFormStore.getState().checkoutSessionStatus?.type;
164164

165165
// Explicitly check that the intent is in a successful state
166166
// If the intent is successful but the type is not 'complete',
167167
// or if there is no existingSuccessfulCheckoutIntent flag,
168168
// redirect to Plan Details to restart the process.
169169
if (
170170
!determineExistingSuccessfulCheckoutIntent(checkoutIntent.state)
171-
&& checkoutIntentType !== 'complete'
171+
&& stripeCheckoutSessionType !== 'complete'
172172
&& !checkoutIntent.existingSuccessfulCheckoutIntent
173173
) {
174174
return redirect(CheckoutPageRoute.PlanDetails);

0 commit comments

Comments
 (0)