mirror of
https://github.com/soconnor0919/beenvoice.git
synced 2026-02-05 00:06:36 -05:00
feat: Remove Vercel Analytics, generalize deployment instructions, and switch base URL configuration to NEXT_PUBLIC_APP_URL.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user