This commit is contained in:
Michał Leszczyk 2022-05-25 14:27:26 +02:00
parent 2a3a0c96f8
commit bbc598ddf7
No known key found for this signature in database
GPG Key ID: FA123CA8BAA2FBF4
2 changed files with 3 additions and 14 deletions

View File

@ -21,7 +21,7 @@ services:
accounts:
# 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
container_name: accounts
restart: unless-stopped

View File

@ -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 (
<div className="w-full mb-24">
<Metadata>
@ -173,7 +162,7 @@ const PlansSlider = () => {
<div className="text-center my-6">
{(!hasActivePlan || isHigherThanCurrent) &&
(isCurrentPlanPaid ? (
<Button $primary onClick={manageSubscription}>
<Button $primary as="a" href="/api/stripe/billing">
Upgrade
</Button>
) : (
@ -183,7 +172,7 @@ const PlansSlider = () => {
))}
{isCurrent && <Button disabled>Current</Button>}
{isLower && (
<Button $primary onClick={manageSubscription}>
<Button as="a" href="/api/stripe/billing">
Choose
</Button>
)}