mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
wip: refresh design
This commit is contained in:
18
packages/trpc/client/index.ts
Normal file
18
packages/trpc/client/index.ts
Normal file
@ -0,0 +1,18 @@
|
||||
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';
|
||||
Reference in New Issue
Block a user