wip
This commit is contained in:
parent
2a3a0c96f8
commit
bbc598ddf7
|
@ -21,7 +21,7 @@ services:
|
||||||
|
|
||||||
accounts:
|
accounts:
|
||||||
# uncomment "build" and comment out "image" to build from sources
|
# uncomment "build" and comment out "image" to build from sources
|
||||||
build: https://github.com/SkynetLabs/skynet-accounts.git#main
|
build: https://github.com/SkynetLabs/skynet-accounts.git#dashboard-v2-tests
|
||||||
# image: skynetlabs/skynet-accounts:1.1.0
|
# image: skynetlabs/skynet-accounts:1.1.0
|
||||||
container_name: accounts
|
container_name: accounts
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
|
@ -112,17 +112,6 @@ const PlansSlider = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const manageSubscription = async () => {
|
|
||||||
try {
|
|
||||||
const response = await accountsService.post("stripe/billing", { throwHttpErrors: false, redirect: "manual" });
|
|
||||||
console.log(response.headers.location);
|
|
||||||
debugger;
|
|
||||||
} catch (error) {
|
|
||||||
setShowPaymentError(true);
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full mb-24">
|
<div className="w-full mb-24">
|
||||||
<Metadata>
|
<Metadata>
|
||||||
|
@ -173,7 +162,7 @@ const PlansSlider = () => {
|
||||||
<div className="text-center my-6">
|
<div className="text-center my-6">
|
||||||
{(!hasActivePlan || isHigherThanCurrent) &&
|
{(!hasActivePlan || isHigherThanCurrent) &&
|
||||||
(isCurrentPlanPaid ? (
|
(isCurrentPlanPaid ? (
|
||||||
<Button $primary onClick={manageSubscription}>
|
<Button $primary as="a" href="/api/stripe/billing">
|
||||||
Upgrade
|
Upgrade
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
|
@ -183,7 +172,7 @@ const PlansSlider = () => {
|
||||||
))}
|
))}
|
||||||
{isCurrent && <Button disabled>Current</Button>}
|
{isCurrent && <Button disabled>Current</Button>}
|
||||||
{isLower && (
|
{isLower && (
|
||||||
<Button $primary onClick={manageSubscription}>
|
<Button as="a" href="/api/stripe/billing">
|
||||||
Choose
|
Choose
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
Reference in New Issue