This commit is contained in:
Timo Knuth
2026-02-27 15:19:24 +01:00
parent b7f8221095
commit 253c3c1c6d
134 changed files with 11188 additions and 1871 deletions

View File

@@ -5,6 +5,7 @@ import superjson from 'superjson'
import { createElement, type ReactNode } from 'react'
import AsyncStorage from '@react-native-async-storage/async-storage'
import type { AppRouter } from '@innungsapp/admin'
import { getApiBaseUrl } from './api-url'
export const trpc = createTRPCReact<AppRouter>()
@@ -17,14 +18,10 @@ export const queryClient = new QueryClient({
},
})
function getApiUrl() {
return process.env.EXPO_PUBLIC_API_URL ?? 'http://localhost:3000'
}
const trpcClient = trpc.createClient({
links: [
httpBatchLink({
url: `${getApiUrl()}/api/trpc`,
url: `${getApiBaseUrl()}/api/trpc`,
transformer: superjson,
async headers() {
// Include session cookie for auth