Skip to content

Commit 8be1c03

Browse files
committed
remove logs and unused vars
1 parent dfa93b3 commit 8be1c03

File tree

4 files changed

+18
-40
lines changed

4 files changed

+18
-40
lines changed

Diff for: src/ui/buttons/props.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,15 @@ export type ButtonExtensions = {|
501501
resume: () => void,
502502
|};
503503

504+
type ShowPayPalAppSwitchOverlay = {|
505+
focus: () => void,
506+
close: () => void,
507+
|};
508+
509+
type HidePayPalAppSwitchOverlay = {|
510+
close: () => void,
511+
|};
512+
504513
export type ButtonProps = {|
505514
// app switch properties
506515
appSwitchWhenAvailable: string,
@@ -515,8 +524,8 @@ export type ButtonProps = {|
515524
// Not passed to child iframe
516525
visibilityChangeHandler: () => void,
517526

518-
showPayPalAppSwitchOverlay: () => void,
519-
hidePayPalAppSwitchOverlay: () => void,
527+
showPayPalAppSwitchOverlay: (args: ShowPayPalAppSwitchOverlay) => void,
528+
hidePayPalAppSwitchOverlay: (args: HidePayPalAppSwitchOverlay) => void,
520529

521530
fundingSource?: ?$Values<typeof FUNDING>,
522531
intent: $Values<typeof INTENT>,

Diff for: src/ui/overlay/paypal-app-switch/overlay.jsx

+5-23
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,26 @@
11
/* @flow */
22
/** @jsx node */
3-
/* eslint max-lines: off, react/jsx-max-depth: off */
43

54
import {
65
isIos,
76
isIpadOs,
87
isFirefox,
98
animate,
109
noop,
11-
destroyElement,
12-
uniqueID,
1310
supportsPopups,
14-
type EventEmitterType,
15-
toCSS,
1611
} from "@krakenjs/belter/src";
17-
import { EVENT, CONTEXT } from "@krakenjs/zoid/src";
1812
import { node, type ElementNode } from "@krakenjs/jsx-pragmatic/src";
1913
import { LOGO_COLOR, PayPalRebrandLogo } from "@paypal/sdk-logos/src";
14+
import { type ZalgoPromise } from "@krakenjs/zalgo-promise/src";
2015

21-
import { getContainerStyle, getSandboxStyle, CLASS } from "./style";
16+
import { getContainerStyle, getSandboxStyle } from "./style";
2217

23-
export type OverlayProps = {|
24-
// context: $Values<typeof CONTEXT>,
25-
close: () => ZalgoPromise<void>,
18+
type OverlayProps = {|
2619
buttonSessionID: string,
20+
close: () => ZalgoPromise<void>,
2721
focus: () => ZalgoPromise<void>,
28-
// event: EventEmitterType,
29-
// frame?: ?HTMLElement,
30-
// prerenderFrame?: ?HTMLElement,
31-
// content?: void | {|
32-
// windowMessage?: string,
33-
// continueMessage?: string,
34-
// cancelMessage?: string,
35-
// interrogativeMessage?: string,
36-
// |},
37-
// autoResize?: boolean,
38-
// hideCloseButton?: boolean,
39-
// nonce?: string,
40-
// fullScreen?: boolean,
4122
|};
23+
4224
export function PayPalAppSwitchOverlay({
4325
close,
4426
focus,

Diff for: src/zoid/buttons/component.jsx

+2-11
Original file line numberDiff line numberDiff line change
@@ -310,14 +310,11 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
310310
value:
311311
({ props: { buttonSessionID } }) =>
312312
({ close, focus }) => {
313-
console.log(
314-
"*** nik ***** show - PayPalAppSwitchOverlay *********"
315-
);
316313
const overlay = (
317314
<PayPalAppSwitchOverlay
315+
buttonSessionID={buttonSessionID}
318316
close={close}
319317
focus={focus}
320-
buttonSessionID={buttonSessionID}
321318
/>
322319
).render(dom({ doc: document }));
323320

@@ -331,16 +328,10 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
331328
value:
332329
({ props: { buttonSessionID } }) =>
333330
({ close }) => {
334-
console.log(
335-
"*** nik ***** hide - PayPalAppSwitchOverlay *********"
336-
);
337-
338-
// const body = document.getElementsByTagName("body")?.[0];
339331
const overlay = document.getElementsByName(
340332
`paypal-overlay-${buttonSessionID}`
341333
)?.[0];
342334

343-
console.log(overlay);
344335
if (overlay) {
345336
close();
346337
overlay.remove();
@@ -449,7 +440,7 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
449440
type: "string",
450441
required: false,
451442
queryParam: true,
452-
value: () => "",
443+
value: getAmount,
453444
},
454445

455446
apiStageHost: {

Diff for: src/zoid/checkout/component.jsx

-4
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ export function getCheckoutComponent(): CheckoutComponent {
9090
const isVenmo = fundingSource === FUNDING.VENMO;
9191
const browserLanguage = isVenmo ? "en" : lang;
9292
const content = containerContent(fundingSource)[browserLanguage];
93-
console.log("frame");
94-
console.log(frame);
95-
console.log("prerenderFrame");
96-
console.log(prerenderFrame);
9793
if (isVenmo) {
9894
return (
9995
<VenmoOverlay

0 commit comments

Comments
 (0)