export const trpc = createTRPCClient<AppRouter>({
links: [
httpBatchLink({
url: getServerUrl(),
async headers() {
const authorization = await getAuthHeader()
const deviceId = await createOrGetDeviceIdFromStore()
return {
authorization,
'x-device-id': deviceId,
}
}
})
]
})
export const trpc = createTRPCClient<AppRouter>({
links: [
httpBatchLink({
url: getServerUrl(),
async headers() {
const authorization = await getAuthHeader()
const deviceId = await createOrGetDeviceIdFromStore()
return {
authorization,
'x-device-id': deviceId,
}
}
})
]
})