db7c3fb52f
* migrate router * createTRPCReact * frontend 1 * random format change * frontend 2 * withQuery * form router * TS-ERROR: proxy on utils-client * inferance * ssg * reuse * trpc rc4 * Apply suggestions from code review * skip test * move skip one level up * whops * rc 6 with new setData func Co-authored-by: zomars <zomars@me.com>
15 lines
291 B
TypeScript
15 lines
291 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.appById.useQuery(
|
|
{ appId },
|
|
{
|
|
enabled: status === "authenticated",
|
|
}
|
|
);
|
|
}
|