mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-05 20:21:50 +02:00
💳 Support payments with Stripe (#822)
This commit is contained in:
parent
969ae35971
commit
6f425edeaa
20 changed files with 712 additions and 229 deletions
|
@ -50,7 +50,7 @@ export const UserProvider = (props: { children?: React.ReactNode }) => {
|
|||
const queryClient = trpc.useContext();
|
||||
|
||||
const user = useWhoAmI();
|
||||
const billingQuery = trpc.user.getBilling.useQuery();
|
||||
const subscriptionQuery = trpc.user.subscription.useQuery();
|
||||
const { data: userPreferences } = trpc.userPreferences.get.useQuery();
|
||||
|
||||
const shortName = user
|
||||
|
@ -59,7 +59,7 @@ export const UserProvider = (props: { children?: React.ReactNode }) => {
|
|||
: user.id.substring(0, 10)
|
||||
: t("guest");
|
||||
|
||||
if (!user || userPreferences === undefined || !billingQuery.isFetched) {
|
||||
if (!user || userPreferences === undefined || !subscriptionQuery.isFetched) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue