mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-12 07:31:54 +02:00
💵 Add ability to accept payments (#722)
This commit is contained in:
parent
1c7c8c7678
commit
2ccf705a2c
44 changed files with 2021 additions and 604 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue