From 9b2c1ab5a66edb37cc35d6988b1f9db02d80dcb5 Mon Sep 17 00:00:00 2001 From: Mayank Bansal Date: Sun, 11 Jan 2026 04:10:32 +0530 Subject: [PATCH 1/2] chore: replace my site links with migrated pages --- faq.html | 2 +- js/constants.js | 2 +- js/login.js | 4 +++- js/navbar.js | 8 ++++---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/faq.html b/faq.html index 8b25c567..6cb75e45 100644 --- a/faq.html +++ b/faq.html @@ -54,7 +54,7 @@
- +
Hello, User!
diff --git a/js/constants.js b/js/constants.js index 4e80a2bd..82bce48b 100644 --- a/js/constants.js +++ b/js/constants.js @@ -1,3 +1,3 @@ const API_BASE_URL = 'http://localhost:3000'; -const MY_BASE_URL = 'https://my.realdevsquad.com'; const MAIN_SITE = 'https://www.realdevsquad.com'; +const STATUS_BASE_URL = 'https://status.realdevsquad.com'; diff --git a/js/login.js b/js/login.js index 68d6b040..3da3ca79 100644 --- a/js/login.js +++ b/js/login.js @@ -50,7 +50,9 @@ const fetchData = () => { throw new Error(res.error); } if (res.incompleteUserDetails) { - return window.location.replace('https://my.realdevsquad.com/signup'); + return window.location.replace( + 'https://www.realdevsquad.com/new-signup', + ); } setUserGreeting(username, first_name, picture.url); }) diff --git a/js/navbar.js b/js/navbar.js index 17b4562a..edb8bc11 100644 --- a/js/navbar.js +++ b/js/navbar.js @@ -32,22 +32,22 @@ document.getElementById('signout-option').addEventListener('click', () => { const myStatusButton = document.getElementById('my-status'); myStatusButton.addEventListener('click', () => { - window.location.href = MY_BASE_URL; + window.location.href = `${MAIN_SITE}/status`; }); const myProfileButton = document.getElementById('my-profile'); myProfileButton.addEventListener('click', () => { - window.location.href = `${MY_BASE_URL}/profile`; + window.location.href = `${MAIN_SITE}/profile`; }); const myTasksButton = document.getElementById('my-tasks'); myTasksButton.addEventListener('click', () => { - window.location.href = `${MY_BASE_URL}/tasks`; + window.location.href = `${STATUS_BASE_URL}/tasks`; }); const myIdentityButton = document.getElementById('my-identity'); myIdentityButton.addEventListener('click', () => { - window.location.href = `${MY_BASE_URL}/identity`; + window.location.href = `${MAIN_SITE}/identity`; }); const mainSiteButton = document.getElementById('main-site'); From 52eb1fa7148825cba1e9a6e717bf6df9fa006ac6 Mon Sep 17 00:00:00 2001 From: Mayank Bansal Date: Mon, 12 Jan 2026 01:14:14 +0530 Subject: [PATCH 2/2] fix: api constant and null check for nav items --- js/constants.js | 4 +++- js/navbar.js | 40 +++++++++++++++++++++++++--------------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/js/constants.js b/js/constants.js index 82bce48b..9eca37e3 100644 --- a/js/constants.js +++ b/js/constants.js @@ -1,3 +1,5 @@ -const API_BASE_URL = 'http://localhost:3000'; +const API_BASE_URL = window.location.hostname.endsWith('realdevsquad.com') + ? 'https://api.realdevsquad.com' + : 'http://localhost:3000'; const MAIN_SITE = 'https://www.realdevsquad.com'; const STATUS_BASE_URL = 'https://status.realdevsquad.com'; diff --git a/js/navbar.js b/js/navbar.js index edb8bc11..fcc7a0e1 100644 --- a/js/navbar.js +++ b/js/navbar.js @@ -31,29 +31,39 @@ document.getElementById('signout-option').addEventListener('click', () => { }); const myStatusButton = document.getElementById('my-status'); -myStatusButton.addEventListener('click', () => { - window.location.href = `${MAIN_SITE}/status`; -}); +if (myStatusButton) { + myStatusButton.addEventListener('click', () => { + window.location.href = `${MAIN_SITE}/status`; + }); +} const myProfileButton = document.getElementById('my-profile'); -myProfileButton.addEventListener('click', () => { - window.location.href = `${MAIN_SITE}/profile`; -}); +if (myProfileButton) { + myProfileButton.addEventListener('click', () => { + window.location.href = `${MAIN_SITE}/profile`; + }); +} const myTasksButton = document.getElementById('my-tasks'); -myTasksButton.addEventListener('click', () => { - window.location.href = `${STATUS_BASE_URL}/tasks`; -}); +if (myTasksButton) { + myTasksButton.addEventListener('click', () => { + window.location.href = `${STATUS_BASE_URL}/tasks`; + }); +} const myIdentityButton = document.getElementById('my-identity'); -myIdentityButton.addEventListener('click', () => { - window.location.href = `${MAIN_SITE}/identity`; -}); +if (myIdentityButton) { + myIdentityButton.addEventListener('click', () => { + window.location.href = `${MAIN_SITE}/identity`; + }); +} const mainSiteButton = document.getElementById('main-site'); -mainSiteButton.addEventListener('click', () => { - window.location.href = MAIN_SITE; -}); +if (mainSiteButton) { + mainSiteButton.addEventListener('click', () => { + window.location.href = MAIN_SITE; + }); +} document.querySelectorAll('.user-greet').forEach((greet) => { greet.addEventListener('click', () => {