Skip to content

Commit 41b1465

Browse files
committed
Fix subscription status check for gifted pro users
1 parent c4bbb85 commit 41b1465

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/web/utils/useDatabase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const getUserById = async (user_id: string): Promise<IUser> => {
2020

2121
return {
2222
...user,
23-
has_active_subscription: user.pro_gifted ?? ["trialing", "active"].includes(
23+
has_active_subscription: user.pro_gifted ? true : ["trialing", "active"].includes(
2424
(user?.stripe_subscription as unknown as Stripe.Subscription)?.status
2525
),
2626
} as unknown as IUser;

0 commit comments

Comments
 (0)