fix: add badge for disabled workflow actions and templates in trial mode (#19675)
* add badge for trial mode * fix tooltip issue * fix typo * add inactive team plan badge * change to one salesforce request * clean up * fix type error --------- Co-authored-by: CarinaWolli <[email protected]> Co-authored-by: Bailey Pumfleet <[email protected]>
This commit is contained in:
10 files changed
+61
-33
No files matched your search
@@ -39,12 +39,12 @@ export function useHasEnterprisePlan() {
|
||||
return { isPending, hasTeamPlan: hasTeamPlan?.hasTeamPlan };
|
||||
}
|
||||
|
||||
export function useHasActiveTeamPlan(teamId?: number) {
|
||||
if (IS_SELF_HOSTED) return { isPending: false, hasActiveTeamPlan: true };
|
||||
export function useHasActiveTeamPlan() {
|
||||
if (IS_SELF_HOSTED) return { isPending: false, hasActiveTeamPlan: true, isTrial: false };
|
||||
|
||||
const { data, isPending } = trpc.viewer.teams.hasActiveTeamPlan.useQuery();
|
||||
|
||||
return { isPending, hasActiveTeamPlan: !!data };
|
||||
return { isPending, hasActiveTeamPlan: !!data?.isActive, isTrial: !!data?.isTrial };
|
||||
}
|
||||
|
||||
export default useHasPaidPlan;
|
||||
Reference in new issue
Block a user