data?.priceId.startsWith("monthly_") ? "month" : "year", [data?.priceId]);
const basePrice = useMemo(() => period === "year" ? YEARLY_PRICES[0] : MONTHLY_PRICES[0], [period]);
- if ((isLoading && !user?.premium) || (!isLoading && !data) || (data && !isActive(data.status))) {
+ if ((isLoading && user?.premium === 0) || (!isLoading && !data) || (data && !isActive(data.status))) {
return (
{error && error !== "Not Found" && }
diff --git a/components/header.tsx b/components/header.tsx
index 3dc79ae..2ef498c 100644
--- a/components/header.tsx
+++ b/components/header.tsx
@@ -110,9 +110,9 @@ function Dropdown({ user }: { user: User; }) {
-
+
- {user.premium ? "Billing" : "Premium"}
+ {user.premium === 0 ? "Premium" : "Billing"}