feat: Remove Vercel Analytics, generalize deployment instructions, and switch base URL configuration to NEXT_PUBLIC_APP_URL.

This commit is contained in:
2025-11-29 02:52:10 -05:00
parent 2fc03566d1
commit a1c7b9223f
6 changed files with 16 additions and 17 deletions

View File

@@ -1,6 +1,5 @@
import "~/styles/globals.css";
import { Analytics } from "@vercel/analytics/next";
import { type Metadata } from "next";
import { Geist, Geist_Mono, Instrument_Serif } from "next/font/google";
@@ -136,7 +135,6 @@ export default function RootLayout({
}}
/>
</head>
<Analytics />
<body className="bg-background text-foreground relative min-h-screen overflow-x-hidden font-sans antialiased">
<ThemeProvider>
<ColorThemeProvider>

View File

@@ -108,11 +108,9 @@ export const emailRouter = createTRPCRouter({
customMessage: input.customMessage,
userName,
userEmail,
baseUrl: process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: process.env.NODE_ENV === "production"
? "https://beenvoice.app"
: "http://localhost:3000",
baseUrl: process.env.NEXT_PUBLIC_APP_URL
? process.env.NEXT_PUBLIC_APP_URL
: "http://localhost:3000",
});
// Determine Resend instance and email configuration to use

View File

@@ -73,6 +73,6 @@ export function TRPCReactProvider(props: { children: React.ReactNode }) {
function getBaseUrl() {
if (typeof window !== "undefined") return window.location.origin;
if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`;
if (process.env.NEXT_PUBLIC_APP_URL) return process.env.NEXT_PUBLIC_APP_URL;
return `http://localhost:${process.env.PORT ?? 3000}`;
}