fix cv animations

This commit is contained in:
2026-06-18 01:41:25 +02:00
parent 3e5be46503
commit 0d79adb104
15 changed files with 606 additions and 724 deletions

View File

@@ -1,22 +1,3 @@
import { httpBatchLink } from "@trpc/client";
import { trpcRouter } from "~/server/routers/_app";
function getBaseUrl() {
if (typeof window !== 'undefined')
// browser should use relative path
return '';
if (process.env.VERCEL_URL)
// reference for vercel.com
return `https://${process.env.VERCEL_URL}`;
if (process.env.RENDER_INTERNAL_HOSTNAME)
// reference for render.com
return `http://${process.env.RENDER_INTERNAL_HOSTNAME}:${process.env.PORT}`;
// assume localhost
return `http://localhost:${process.env.PORT ?? 3000}`;
};
export const servTrpc = trpcRouter.createCaller({
links: [
httpBatchLink({url: `${getBaseUrl()}/api/trpc`}),
],
});
export const servTrpc = trpcRouter.createCaller({});