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

15 lines
291 B
TypeScript
Raw Normal View History

import { useSession } from "next-auth/react";
import { trpc } from "@calcom/trpc/react";
export default function useApp(appId: string) {
const { status } = useSession();
return trpc.viewer.appById.useQuery(
{ appId },
{
enabled: status === "authenticated",
}
);
}