Skip to content

Commit 6122181

Browse files
committed
remove console logs
1 parent b8e61dc commit 6122181

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

packages/react-paypal-js/src/v6/hooks/useEligibleMethods.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ export function useEligibleMethods(
9090
// 3. Eligibility not already in context (from server hydration or another fetch)
9191
// UNLESS the payload has changed from what was used to fetch it
9292
if (!sdkInstance) {
93-
console.log(
94-
"[useEligibleMethods] Skipping: sdkInstance not available yet",
95-
);
9693
return;
9794
}
9895

@@ -102,9 +99,6 @@ export function useEligibleMethods(
10299

103100
// Skip if we already fetched with this exact config
104101
if (hasFetchedThisConfig) {
105-
console.log(
106-
"[useEligibleMethods] Skipping: already fetched with this config (returning from cache/context)",
107-
);
108102
return;
109103
}
110104

@@ -114,9 +108,6 @@ export function useEligibleMethods(
114108
eligiblePaymentMethodsRef.current &&
115109
lastFetchRef.current === null
116110
) {
117-
console.log(
118-
"[useEligibleMethods] Skipping: eligibility already in context (server hydration or previous fetch)",
119-
);
120111
lastFetchRef.current = {
121112
instance: sdkInstance,
122113
payload: memoizedPayload,
@@ -133,17 +124,10 @@ export function useEligibleMethods(
133124
let isSubscribed = true;
134125
setIsFetching(true);
135126

136-
console.log(
137-
"[useEligibleMethods] Starting network call: findEligibleMethods()",
138-
);
139127
sdkInstance
140128
.findEligibleMethods(memoizedPayload ?? {})
141129
.then((result) => {
142130
if (isSubscribed) {
143-
console.log(
144-
"[useEligibleMethods] Network call succeeded, dispatching SET_ELIGIBILITY to context",
145-
result,
146-
);
147131
dispatch({
148132
type: INSTANCE_DISPATCH_ACTION.SET_ELIGIBILITY,
149133
value: result,
@@ -182,12 +166,6 @@ export function useEligibleMethods(
182166
};
183167
}
184168

185-
console.log("[useEligibleMethods] Returning state:", {
186-
hasEligibility: !!eligiblePaymentMethods,
187-
isLoading,
188-
hasError: !!eligibilityError,
189-
});
190-
191169
return {
192170
eligiblePaymentMethods,
193171
isLoading,

0 commit comments

Comments
 (0)