feat: lift country/vatId state to CheckoutContent
This commit is contained in:
@@ -170,6 +170,8 @@ function CheckoutContent() {
|
|||||||
const planId = plan!
|
const planId = plan!
|
||||||
const billingInterval = interval as 'month' | 'year'
|
const billingInterval = interval as 'month' | 'year'
|
||||||
const pageviewLimit = Number(limit)
|
const pageviewLimit = Number(limit)
|
||||||
|
const [country, setCountry] = useState('')
|
||||||
|
const [vatId, setVatId] = useState('')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-screen overflow-hidden">
|
<div className="flex h-screen overflow-hidden">
|
||||||
@@ -208,6 +210,10 @@ function CheckoutContent() {
|
|||||||
plan={planId}
|
plan={planId}
|
||||||
interval={billingInterval}
|
interval={billingInterval}
|
||||||
limit={pageviewLimit}
|
limit={pageviewLimit}
|
||||||
|
country={country}
|
||||||
|
vatId={vatId}
|
||||||
|
onCountryChange={setCountry}
|
||||||
|
onVatIdChange={setVatId}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Payment form */}
|
{/* Payment form */}
|
||||||
@@ -215,6 +221,8 @@ function CheckoutContent() {
|
|||||||
plan={planId}
|
plan={planId}
|
||||||
interval={billingInterval}
|
interval={billingInterval}
|
||||||
limit={pageviewLimit}
|
limit={pageviewLimit}
|
||||||
|
country={country}
|
||||||
|
vatId={vatId}
|
||||||
/>
|
/>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user