From 9d85ca27da4a6129be3354ce317bdf51d41b6082 Mon Sep 17 00:00:00 2001 From: Luke C Hartman Date: Mon, 21 Oct 2024 15:34:25 -0700 Subject: [PATCH] add dev deploy domain --- context/AuthContext.jsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/context/AuthContext.jsx b/context/AuthContext.jsx index e7f0d5f..c60e93e 100644 --- a/context/AuthContext.jsx +++ b/context/AuthContext.jsx @@ -114,12 +114,14 @@ export const AuthContextProvider = ({children}) => { const verifyEmail = (user) => { return new Promise((resolve, reject) => { const isDevelopment = window.location.hostname === 'localhost'; - var actionCodeSettings = { - url: isDevelopment - ? 'http://localhost:3001/login' // Use localhost during development - : 'https://caffeine-dashboard.netlify.app/login', // Use production URL + const actionCodeSettings = { + url: hostname === 'localhost' + ? 'http://localhost:3001/login' // Local development URL + : hostname.includes('dev') + ? 'https://dev--your-netlify-app.netlify.app/login' // Netlify dev branch URL + : 'https://caffeine-dashboard.netlify.app/login', // Production URL handleCodeInApp: true, - }; + } sendEmailVerification(user, actionCodeSettings) .then(() => {