-.-
This commit is contained in:
+1
-6
@@ -14,6 +14,7 @@ import SuperJSON from "superjson";
|
||||
|
||||
import { type AppRouter } from "@/server/api/root";
|
||||
import { createQueryClient } from "./query-client";
|
||||
import { getBaseUrl } from "@/lib/utils";
|
||||
|
||||
let clientQueryClientSingleton: QueryClient | undefined = undefined;
|
||||
const getQueryClient = () => {
|
||||
@@ -84,9 +85,3 @@ export function TRPCReactProvider(props: { children: React.ReactNode }) {
|
||||
</QueryClientProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function getBaseUrl() {
|
||||
if (typeof window !== "undefined") return window.location.origin;
|
||||
if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`;
|
||||
return `http://localhost:${process.env.PORT ?? 3000}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user