removed excess comments

This commit is contained in:
Michael Freno
2026-01-04 11:14:54 -05:00
parent b81de6441b
commit 7e89e6dda2
68 changed files with 72 additions and 941 deletions

View File

@@ -2,7 +2,6 @@ import { createTRPCProxyClient, httpBatchLink, loggerLink } from "@trpc/client";
import type { AppRouter } from "~/server/api/root";
const getBaseUrl = () => {
// Browser: use relative URL
if (typeof window !== "undefined") return "";
const domain = import.meta.env.VITE_DOMAIN;
@@ -27,12 +26,10 @@ function getCSRFToken(): string | undefined {
export const api = createTRPCProxyClient<AppRouter>({
links: [
// Only enable logging in development mode
...(process.env.NODE_ENV === "development"
? [
loggerLink({
enabled: (opts) => {
// Suppress 401 UNAUTHORIZED errors from logs
const is401 =
opts.direction === "down" &&
opts.result instanceof Error &&
@@ -42,7 +39,6 @@ export const api = createTRPCProxyClient<AppRouter>({
})
]
: []),
// identifies what url will handle trpc requests
httpBatchLink({
url: `${getBaseUrl()}/api/trpc`,
headers: () => {