mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-06 18:31:00 +00:00
subscription button optional layout for renew modal
This commit is contained in:
parent
a5a35f90fc
commit
3a18a41404
@ -19,7 +19,7 @@ const PaymentModal = dynamic(
|
|||||||
{ ssr: false }
|
{ ssr: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
const SubscriptionPaymentButtons = ({ onSuccess, onError, onRecurringSubscriptionSuccess, setIsProcessing, oneTime = false, recurring = false }) => {
|
const SubscriptionPaymentButtons = ({ onSuccess, onError, onRecurringSubscriptionSuccess, setIsProcessing, oneTime = false, recurring = false, layout = "row" }) => {
|
||||||
const [invoice, setInvoice] = useState(null);
|
const [invoice, setInvoice] = useState(null);
|
||||||
const [showRecurringOptions, setShowRecurringOptions] = useState(false);
|
const [showRecurringOptions, setShowRecurringOptions] = useState(false);
|
||||||
const [nwcInput, setNwcInput] = useState('');
|
const [nwcInput, setNwcInput] = useState('');
|
||||||
@ -206,7 +206,7 @@ const SubscriptionPaymentButtons = ({ onSuccess, onError, onRecurringSubscriptio
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{!invoice && (
|
{!invoice && (
|
||||||
<div className="w-full flex flex-row justify-between">
|
<div className={`w-full flex ${layout === "row" ? "flex-row justify-between" : "flex-col items-center"}`}>
|
||||||
{(oneTime || (!oneTime && !recurring)) && (
|
{(oneTime || (!oneTime && !recurring)) && (
|
||||||
<GenericButton
|
<GenericButton
|
||||||
label="Pay as you go"
|
label="Pay as you go"
|
||||||
|
@ -69,6 +69,7 @@ const RenewSubscription = ({ visible, onHide, subscribedUntil }) => {
|
|||||||
onRecurringSubscriptionSuccess={handleSubscriptionSuccess}
|
onRecurringSubscriptionSuccess={handleSubscriptionSuccess}
|
||||||
onError={handleSubscriptionError}
|
onError={handleSubscriptionError}
|
||||||
setIsProcessing={setIsProcessing}
|
setIsProcessing={setIsProcessing}
|
||||||
|
layout="col"
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
)}
|
)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user