Skip to content

Commit 972bf0f

Browse files
feat: fix the miller dev shell buy now button
1 parent 776dfab commit 972bf0f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

apps/frontend/src/components/BuyNowButton.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ export function BuyNowButton({
4444
className?: string;
4545
text?: string;
4646
}) {
47+
console.log("loading the button", user, productKey, color, className, text);
4748
const { mutateAsync } = useGetPaymentLink();
4849

49-
const orgUuid = user?.memberships?.find((m) =>
50-
m.roles?.some((r) => r.name === "owner")
50+
const orgUuid = user?.memberships?.find(
51+
(m) => m.roles?.some((r) => r.name === "owner"),
5152
)?.organisation?.uuid;
5253

5354
const product = productMapping.find((p) => p.productKey === productKey);
@@ -68,7 +69,7 @@ export function BuyNowButton({
6869
mode: product.mode,
6970
organisationUuid: orgUuid,
7071
});
71-
72+
console.log("link", link);
7273
window.location.href = link.stripeSessionUrl;
7374
};
7475

@@ -78,7 +79,7 @@ export function BuyNowButton({
7879
color={color}
7980
className={clsx(
8081
"rounded-lg text-xl px-14 py-4 hover:shadow-lg border-white",
81-
className
82+
className,
8283
)}
8384
>
8485
{text || "Buy now"}

apps/frontend/src/marketing-pages/dev-shell-home/Pricing.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Container } from "../../components/Container";
22
import { UserDto } from "@use-miller/shared-api-client";
33
import { BuyNowButton } from "../../components/BuyNowButton.jsx";
44
import { CheckIcon } from "@heroicons/react/24/outline";
5+
import { SignUpBuyNowButton } from "../../components/SignupBuyNow.jsx";
56

67
const buyBenefits = [
78
"Mac and Windows dev environment setup in 1 command",
@@ -49,7 +50,7 @@ export function Pricing({ user }: { user: UserDto }) {
4950
$29<span className="text-base">USD</span>
5051
</p>
5152
<div className="mx-auto flex gap-x-6 md:mx-0 mb-10">
52-
<BuyNowButton
53+
<SignUpBuyNowButton
5354
user={user}
5455
productKey="dev-shell"
5556
color="cyan"

0 commit comments

Comments
 (0)