diff --git a/faq.html b/faq.html
index 8b25c56..6cb75e4 100644
--- a/faq.html
+++ b/faq.html
@@ -54,7 +54,7 @@
-
+
Hello, User!
diff --git a/js/constants.js b/js/constants.js
index 4e80a2b..9eca37e 100644
--- a/js/constants.js
+++ b/js/constants.js
@@ -1,3 +1,5 @@
-const API_BASE_URL = 'http://localhost:3000';
-const MY_BASE_URL = 'https://my.realdevsquad.com';
+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/login.js b/js/login.js
index 68d6b04..3da3ca7 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 17b4562..fcc7a0e 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 = MY_BASE_URL;
-});
+if (myStatusButton) {
+ myStatusButton.addEventListener('click', () => {
+ window.location.href = `${MAIN_SITE}/status`;
+ });
+}
const myProfileButton = document.getElementById('my-profile');
-myProfileButton.addEventListener('click', () => {
- window.location.href = `${MY_BASE_URL}/profile`;
-});
+if (myProfileButton) {
+ myProfileButton.addEventListener('click', () => {
+ window.location.href = `${MAIN_SITE}/profile`;
+ });
+}
const myTasksButton = document.getElementById('my-tasks');
-myTasksButton.addEventListener('click', () => {
- window.location.href = `${MY_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 = `${MY_BASE_URL}/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', () => {