cal.pub0.org/packages/lib/hooks/useHasTeamPlan.ts

16 lines
447 B
TypeScript
Raw Normal View History

import { trpc } from "@calcom/trpc/react";
export function useHasTeamPlan() {
const hasTeam = trpc.viewer.teams.hasTeamPlan.useQuery();
return { isLoading: hasTeam.isLoading, hasTeamPlan: hasTeam.data?.hasTeamPlan || false };
}
2023-01-24 15:27:05 +00:00
export function useTeamInvites() {
const listInvites = trpc.viewer.teams.listInvites.useQuery();
return { isLoading: listInvites.isLoading, listInvites: listInvites.data };
}
export default useHasTeamPlan;