import { createTRPCProxyClient, httpBatchLink } from '@trpc/client';
import type { AppRouter } from '../../../api/src/trpc';
import { get } from 'js-cookie';
export const client = createTRPCProxyClient<AppRouter>({
links: [
httpBatchLink({
url: 'http://localhost:8000/trpc',
headers: () => {
return {
authorization: get('authToken')
};
}
})
]
});
import { createTRPCProxyClient, httpBatchLink } from '@trpc/client';
import type { AppRouter } from '../../../api/src/trpc';
import { get } from 'js-cookie';
export const client = createTRPCProxyClient<AppRouter>({
links: [
httpBatchLink({
url: 'http://localhost:8000/trpc',
headers: () => {
return {
authorization: get('authToken')
};
}
})
]
});