2023-01-12 09:53:35 -05:00
|
|
|
import useWaitForI18n from '../../../../shared/hooks/use-wait-for-i18n'
|
2023-02-02 04:15:04 -05:00
|
|
|
import PaymentPreviewPanel from './payment-preview/payment-preview-panel'
|
|
|
|
import CheckoutPanel from './checkout/checkout-panel'
|
|
|
|
import { Col, Row } from 'react-bootstrap'
|
|
|
|
import { PaymentProvider } from '../../context/payment-context'
|
|
|
|
import getMeta from '../../../../utils/meta'
|
2023-01-12 09:53:35 -05:00
|
|
|
|
|
|
|
function Root() {
|
|
|
|
const { isReady } = useWaitForI18n()
|
|
|
|
|
|
|
|
if (!isReady) {
|
|
|
|
return null
|
|
|
|
}
|
|
|
|
|
2023-02-02 04:15:04 -05:00
|
|
|
const publicKey = getMeta('ol-recurlyApiKey')
|
|
|
|
|
|
|
|
return (
|
|
|
|
<PaymentProvider publicKey={publicKey}>
|
|
|
|
<div className="container">
|
|
|
|
<Row className="card-group">
|
|
|
|
<Col md={3} mdPush={1}>
|
|
|
|
<div className="card card-highlighted">
|
|
|
|
<PaymentPreviewPanel />
|
|
|
|
</div>
|
|
|
|
</Col>
|
|
|
|
<Col md={5} mdPush={1}>
|
|
|
|
<div className="card card-highlighted card-border">
|
|
|
|
<CheckoutPanel />
|
|
|
|
</div>
|
|
|
|
</Col>
|
|
|
|
</Row>
|
|
|
|
</div>
|
|
|
|
</PaymentProvider>
|
|
|
|
)
|
2023-01-12 09:53:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export default Root
|