File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,17 +144,13 @@ const Checkout: React.FC<Props> = ({
144144 >
145145 < StepPayment tw = "mb-6" />
146146 </ AccordionItem >
147- < AccordionProvider
148- activeStep = { activeStep }
149- lastActivableStep = { lastActivableStep }
150- setActiveStep = { setActiveStep }
151- step = "Complete"
152- >
153- < StepPlaceOrder
154- termsUrl = { termsUrl }
155- privacyUrl = { privacyUrl }
156- />
157- </ AccordionProvider >
147+ < StepPlaceOrder
148+ isActive = {
149+ activeStep === "Payment" || activeStep === "Complete"
150+ }
151+ termsUrl = { termsUrl }
152+ privacyUrl = { privacyUrl }
153+ />
158154 </ PaymentContainer >
159155 </ AccordionProvider >
160156 </ Accordion >
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import { useRouter } from "next/router"
44import { useContext , useState } from "react"
55import { Trans , useTranslation } from "react-i18next"
66
7- import { AccordionContext } from "components/data/AccordionProvider"
87import { AppContext } from "components/data/AppProvider"
98import { GTMContext } from "components/data/GTMProvider"
109import { ButtonWrapper } from "components/ui/Button"
@@ -25,18 +24,22 @@ import {
2524} from "./styled"
2625
2726interface Props {
27+ isActive : boolean
2828 termsUrl : string
2929 privacyUrl : string
3030}
3131
32- const StepPlaceOrder : React . FC < Props > = ( { termsUrl, privacyUrl } ) => {
32+ const StepPlaceOrder : React . FC < Props > = ( {
33+ isActive,
34+ termsUrl,
35+ privacyUrl,
36+ } ) => {
3337 const { t } = useTranslation ( )
3438 const { query } = useRouter ( )
3539
3640 const [ isPlacingOrder , setIsPlacingOrder ] = useState ( false )
3741
3842 const appCtx = useContext ( AppContext )
39- const accordionCtx = useContext ( AccordionContext )
4043 const gtmCtx = useContext ( GTMContext )
4144
4245 if ( ! appCtx ) {
@@ -146,7 +149,7 @@ const StepPlaceOrder: React.FC<Props> = ({ termsUrl, privacyUrl }) => {
146149 < ButtonWrapper >
147150 < StyledPlaceOrderButton
148151 data-cy = "place-order-button"
149- isActive = { accordionCtx ?. isActive }
152+ isActive = { isActive }
150153 onClick = { handlePlaceOrder }
151154 label = {
152155 < >
You can’t perform that action at this time.
0 commit comments