Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

fix: conditional buy button fix

Dillion Verma30708c4518ca
diff --git a/components/landing/buy-button.tsx b/components/landing/buy-button.tsx
index 329e34e3..ab3baf09 100644
--- a/components/landing/buy-button.tsx
+++ b/components/landing/buy-button.tsx
@@ -49,7 +49,7 @@ export default function BuyButton() {
);
const isUserAuthenticatedAndLoaded = status === "authenticated" && !isLoading;
- const hasMadePayments = data?.user?.customer?.payments.length > 0;
+ const hasMadePayments = data?.user?.customer?.payments?.length > 0;
const isAdmin = data?.user?.role === "ADMIN";
if (status === "loading" || status === "unauthenticated" || isLoading) {