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:
authored and GitHub committed 2025-03-10 15:34:29 +01:00
1 parent bb36807689
commit f2ca2bdc83
10 files changed
+61 -33

No files matched your search

+3 -3
View File
@@ -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;