Skip to content

Commit

Permalink
Fix: Password reset email link (#556) (#560)
Browse files Browse the repository at this point in the history
fixes #556

- production email will now point directly to www.gridironsurvivor.com
without using vercel_env system variables.

Co-authored-by: Shashi Lo <[email protected]>
  • Loading branch information
chris-nowicki and shashilo authored Sep 26, 2024
1 parent f6c9065 commit 90add4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions utils/getBaseUrl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 1 addition & 1 deletion utils/getBaseUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 90add4a

Please sign in to comment.