💵 Add ability to accept payments (#722)

This commit is contained in:
Luke Vella 2023-07-05 14:46:30 +01:00 committed by GitHub
parent 1c7c8c7678
commit 2ccf705a2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 2021 additions and 604 deletions

View file

@ -49,6 +49,7 @@ export const UserProvider = (props: { children?: React.ReactNode }) => {
const queryClient = trpc.useContext();
const { data: user } = trpc.whoami.get.useQuery();
const billingQuery = trpc.user.getBilling.useQuery();
const { data: userPreferences } = trpc.userPreferences.get.useQuery();
const shortName = user
@ -57,7 +58,7 @@ export const UserProvider = (props: { children?: React.ReactNode }) => {
: user.id.substring(0, 10)
: t("guest");
if (!user || userPreferences === undefined) {
if (!user || userPreferences === undefined || !billingQuery.isFetched) {
return null;
}