chore: dashboard fixes (#14968)
* add rewrites for platform dashboard * fix loading checking * add checks * dont display banner for platform client * custom hooks for pllatform * add comment for better explanation * get data from custom hook * update returned user attributes * get data from custom hook
This commit is contained in:
1 parent
57abb26c31
commit
bc42c27230
6 files changed
+122
-67
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { useCheckTeamBilling } from "@lib/hooks/settings/platform/oauth-clients/usePersistOAuthClient";
|
||||
import useMeQuery from "@lib/hooks/useMeQuery";
|
||||
|
||||
export const useGetUserAttributes = () => {
|
||||
const { data: user, isLoading: isUserLoading } = useMeQuery();
|
||||
const { data: userBillingData, isFetching: isUserBillingDataLoading } = useCheckTeamBilling(
|
||||
user?.organizationId
|
||||
);
|
||||
const isPlatformUser = user?.organization.isPlatform;
|
||||
const isPaidUser = userBillingData?.valid;
|
||||
const userOrgId = user?.organizationId;
|
||||
|
||||
return { isUserLoading, isUserBillingDataLoading, isPlatformUser, isPaidUser, userBillingData, userOrgId };
|
||||
};
|
||||
Reference in new issue
Block a user