From 90add4ad2bbbb99e15d7c0e3bf4d948baadca384 Mon Sep 17 00:00:00 2001 From: Chris Nowicki <102450568+chris-nowicki@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:13:04 -0400 Subject: [PATCH] Fix: Password reset email link (#556) (#560) fixes #556 - production email will now point directly to www.gridironsurvivor.com without using vercel_env system variables. Co-authored-by: Shashi Lo <362527+shashilo@users.noreply.github.com> --- utils/getBaseUrl.test.ts | 3 +-- utils/getBaseUrl.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/utils/getBaseUrl.test.ts b/utils/getBaseUrl.test.ts index 2a0149ae..33d46f21 100644 --- a/utils/getBaseUrl.test.ts +++ b/utils/getBaseUrl.test.ts @@ -3,9 +3,8 @@ import { getBaseURL } from './getBaseUrl'; describe('getBaseURL', () => { it('should return the correct base URL for production', () => { process.env.NEXT_PUBLIC_VERCEL_ENV = 'production'; - process.env.NEXT_PUBLIC_VERCEL_URL = 'production.com'; const result = getBaseURL(); - expect(result).toBe('https://production.com'); + expect(result).toBe('https://www.gridironsurvivor.com'); }); it('should return the correct base URL for preview', () => { diff --git a/utils/getBaseUrl.ts b/utils/getBaseUrl.ts index 5008e735..e86f2256 100644 --- a/utils/getBaseUrl.ts +++ b/utils/getBaseUrl.ts @@ -8,7 +8,7 @@ export const getBaseURL = (): string => { // Check for Vercel production environment if (process.env.NEXT_PUBLIC_VERCEL_ENV === 'production') { - return `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`; + return `https://www.gridironsurvivor.com`; } // Check for Vercel preview environment