import { createTRPCReact } from '@trpc/react-query' import { httpBatchLink } from '@trpc/client' import type { AppRouter } from '@repo/shared' export const trpc = createTRPCReact() export function createTrpcClient(baseUrl: string) { return trpc.createClient({ links: [ httpBatchLink({ url: `${baseUrl}/trpc`, }), ], }) }