* perf: Slim down loggedInViewer tRPC router * Fixed trpc client calls for new routes * Moved bookingUnconfirmedCount * Moved getUserTopBanners to me router * Moved shouldVerifyEmail to me router * Moved i18n from public to its own router * fix ssrInit * fix ssrInit usage * fix type check * better naming * fix * fix * Fix types * Removed used of importHandler * perf: Move apps procedures off of loggedInViewer * Moved 2 more apps-related procedures --------- Co-authored-by: hbjORbj <sldisek783@gmail.com>
15 lines
296 B
TypeScript
15 lines
296 B
TypeScript
import { useSession } from "next-auth/react";
|
|
|
|
import { trpc } from "@calcom/trpc/react";
|
|
|
|
export default function useApp(appId: string) {
|
|
const { status } = useSession();
|
|
|
|
return trpc.viewer.apps.appById.useQuery(
|
|
{ appId },
|
|
{
|
|
enabled: status === "authenticated",
|
|
}
|
|
);
|
|
}
|