💳 Support payments with Stripe (#822)

This commit is contained in:
Luke Vella 2023-08-23 15:29:40 +01:00 committed by GitHub
parent 969ae35971
commit 6f425edeaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 712 additions and 229 deletions

View file

@ -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;
}