mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-08 05:31:51 +02:00
💄 Update billing page and refine ui components (#830)
This commit is contained in:
parent
1b100481a0
commit
d261ef0d59
14 changed files with 321 additions and 238 deletions
|
@ -9,6 +9,7 @@ export const getSubscriptionStatus = async (userId: string) => {
|
|||
subscription: {
|
||||
select: {
|
||||
active: true,
|
||||
periodEnd: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -17,6 +18,7 @@ export const getSubscriptionStatus = async (userId: string) => {
|
|||
if (user?.subscription?.active === true) {
|
||||
return {
|
||||
active: true,
|
||||
expiresAt: user.subscription.periodEnd,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -27,6 +29,9 @@ export const getSubscriptionStatus = async (userId: string) => {
|
|||
gt: new Date(),
|
||||
},
|
||||
},
|
||||
select: {
|
||||
endDate: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (
|
||||
|
@ -36,6 +41,7 @@ export const getSubscriptionStatus = async (userId: string) => {
|
|||
return {
|
||||
active: true,
|
||||
legacy: true,
|
||||
expiresAt: userPaymentData.endDate,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue