mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
19 lines
439 B
TypeScript
19 lines
439 B
TypeScript
import { createTRPCProxyClient, httpBatchLink } from '@trpc/client';
|
|
import SuperJSON from 'superjson';
|
|
|
|
import { getBaseUrl } from '@documenso/lib/universal/get-base-url';
|
|
|
|
import { AppRouter } from '../server/router';
|
|
|
|
export const trpc = createTRPCProxyClient<AppRouter>({
|
|
transformer: SuperJSON,
|
|
|
|
links: [
|
|
httpBatchLink({
|
|
url: `${getBaseUrl()}/api/trpc`,
|
|
}),
|
|
],
|
|
});
|
|
|
|
export { TRPCClientError } from '@trpc/client';
|