mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-04-19 19:01:19 +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 }
|
||||
);
|
||||
|
||||
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 [showRecurringOptions, setShowRecurringOptions] = useState(false);
|
||||
const [nwcInput, setNwcInput] = useState('');
|
||||
@ -206,7 +206,7 @@ const SubscriptionPaymentButtons = ({ onSuccess, onError, onRecurringSubscriptio
|
||||
return (
|
||||
<>
|
||||
{!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)) && (
|
||||
<GenericButton
|
||||
label="Pay as you go"
|
||||
|
@ -69,6 +69,7 @@ const RenewSubscription = ({ visible, onHide, subscribedUntil }) => {
|
||||
onRecurringSubscriptionSuccess={handleSubscriptionSuccess}
|
||||
onError={handleSubscriptionError}
|
||||
setIsProcessing={setIsProcessing}
|
||||
layout="col"
|
||||
/>
|
||||
</Card>
|
||||
)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user