diff --git a/src/components/modal/v1/content/US-EZP/parts/Content.jsx b/src/components/modal/v1/content/US-EZP/parts/Content.jsx deleted file mode 100644 index 987252a1fc..0000000000 --- a/src/components/modal/v1/content/US-EZP/parts/Content.jsx +++ /dev/null @@ -1,28 +0,0 @@ -/** @jsx h */ -import { h } from 'preact'; - -import * as NI from './NI'; -import * as EZP from './EZP'; -import Tabs from '../../../parts/Tabs'; - -const tabsMap = { - EZP: { - title: 'Easy Payments', - product: 'EZP', - header: , - body: - }, - NI: { - title: '6 Months Special Financing', - product: 'NI', - header: , - body: - } -}; - -// EZP modal will always have EZP + NI -const Content = () => { - return ; -}; - -export default Content; diff --git a/src/components/modal/v1/content/US-EZP/parts/ContentWrapper.jsx b/src/components/modal/v1/content/US-EZP/parts/ContentWrapper.jsx index 716bc316f6..5a272171dc 100644 --- a/src/components/modal/v1/content/US-EZP/parts/ContentWrapper.jsx +++ b/src/components/modal/v1/content/US-EZP/parts/ContentWrapper.jsx @@ -1,7 +1,6 @@ /** @jsx h */ import { h } from 'preact'; import { useRef, useState, useEffect } from 'preact/hooks'; -import Content from './Content'; import Header from '../../../parts/Header'; import Container from '../../../parts/Container'; import Button from '../../../parts/Button'; @@ -34,7 +33,7 @@ const ContentWrapper = () => { return ( - + { - - - + diff --git a/src/components/modal/v1/content/US-EZP/parts/EZP.jsx b/src/components/modal/v1/content/US-EZP/parts/EZP.jsx deleted file mode 100644 index 90ecc1fc75..0000000000 --- a/src/components/modal/v1/content/US-EZP/parts/EZP.jsx +++ /dev/null @@ -1,93 +0,0 @@ -/** @jsx h */ -import { h } from 'preact'; -import { useRef } from 'preact/hooks'; - -import { createEvent } from '../../../../../../utils'; -import { useXProps, useScroll, useApplyNow, useContent } from '../../../lib'; -import Icon from '../../../parts/Icon'; -import Calculator from './Calculator'; -import Button from '../../../parts/Button'; - -export const Header = () => { - const buttonRef = useRef(); - const handleApplyNowClick = useApplyNow('Apply Now'); - const { title, subtitle } = useContent('EZP'); - - useScroll(({ target: { scrollTop } }) => { - const { offsetTop, clientHeight } = buttonRef.current; - - // Ensure first that the button is being displayed - // See NI.jsx for comment on why value of scrollTop is checked here. - if (scrollTop && offsetTop) { - if (scrollTop - offsetTop < clientHeight + 30) { - window.dispatchEvent(createEvent('apply-now-hidden')); - } else { - window.dispatchEvent(createEvent('apply-now-visible')); - } - } - }, []); - - return ( - - - - - - - {title} - {subtitle} - - Apply Now - - - ); -}; - -export const Content = () => { - const { onClick } = useXProps(); - - const { instructions, about, disclaimer, copyright } = useContent('EZP'); - - return ( - - - - - - How it works - - {instructions.map(([icon, instruction]) => ( - - - - - {instruction} - - ))} - - - - - {about.title} - {about.text} - - - - - - onClick({ linkName: 'Legal Terms' })} - target="_blank" - rel="noopener noreferrer" - href="https://www.paypal.com/us/webapps/mpp/ppcterms" - > - Click here - {' '} - to view the PayPal Credit Terms and Conditions. - - {disclaimer} - {copyright} - - - ); -}; diff --git a/src/components/modal/v1/parts/Header.jsx b/src/components/modal/v1/parts/Header.jsx index 56ea1c296e..c7b890bbc0 100644 --- a/src/components/modal/v1/parts/Header.jsx +++ b/src/components/modal/v1/parts/Header.jsx @@ -6,8 +6,7 @@ import Icon from './Icon'; const LOCALE = { LOGO: { - US: 'logo', - 'US-EZP': 'logo-ezp' + US: 'logo' } }; diff --git a/src/components/modal/v1/parts/Icon.jsx b/src/components/modal/v1/parts/Icon.jsx index c9f871481f..c1ffd67aba 100644 --- a/src/components/modal/v1/parts/Icon.jsx +++ b/src/components/modal/v1/parts/Icon.jsx @@ -9,45 +9,6 @@ const Icon = ({ name, color }) => { return ; case 'logo-text': return ; - case 'logo-ezp': - return ( - - - - - - - - - - - ); case 'close': return (
{subtitle}
{instruction}
{about.text}
- onClick({ linkName: 'Legal Terms' })} - target="_blank" - rel="noopener noreferrer" - href="https://www.paypal.com/us/webapps/mpp/ppcterms" - > - Click here - {' '} - to view the PayPal Credit Terms and Conditions. -
{disclaimer}
{copyright}