()
| 23 | return browserQueryClient; |
| 24 | } |
| 25 | function getUrl() { |
| 26 | const base = (() => { |
| 27 | if (typeof window !== 'undefined') return ''; |
| 28 | if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`; |
| 29 | return 'http://localhost:3000'; |
| 30 | })(); |
| 31 | return `${base}/api/trpc`; |
| 32 | } |
| 33 | export function TRPCReactProvider( |
| 34 | props: Readonly<{ |
| 35 | children: React.ReactNode; |