1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2024-12-20 14:33:47 -05:00
overleaf/services/web/frontend/js/features/subscription/components/new/root.tsx
ilkin-overleaf db54475bd0 Merge pull request from overleaf/ii-payment-page-migration-init
[web] Payment page migration initialisation

GitOrigin-RevId: f33b73a13b96fad3cddf0c0205d05df678ce5300
2023-02-02 18:21:52 +00:00

37 lines
1 KiB
TypeScript

import useWaitForI18n from '../../../../shared/hooks/use-wait-for-i18n'
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'
function Root() {
const { isReady } = useWaitForI18n()
if (!isReady) {
return null
}
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>
)
}
export default Root