From 8ba87e2f59d0b4aa359d501ff11fe59494daa035 Mon Sep 17 00:00:00 2001 From: Solomon Cammack Date: Wed, 18 Aug 2021 08:01:20 +0100 Subject: [PATCH] More changes to the "back to SLMN.GG" URL --- website/src/components/website/WebsiteNav.vue | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/website/src/components/website/WebsiteNav.vue b/website/src/components/website/WebsiteNav.vue index 1ad1c0f0..92d6d3f0 100644 --- a/website/src/components/website/WebsiteNav.vue +++ b/website/src/components/website/WebsiteNav.vue @@ -82,16 +82,18 @@ export default { slmnggDomain() { try { console.log("[minisite]", this.minisite); - if (process.env.NODE_ENV === "development" || process.env.VUE_APP_DEPLOY_MODE === "staging") { - if (!this.minisite?.subdomain) { - return "http://localhost:8080"; - } else { - return window.location.origin.replace(`${this.minisite.subdomain}.`, ""); - } + + if (!this.minisite?.subdomain) { + // basically just defaults if we can't automatically go back up to the parent + if (process.env.NODE_ENV === "development") return "http://localhost:8080"; + if (process.env.VUE_APP_DEPLOY_MODE === "local") return "http://localhost:8080"; + if (process.env.VUE_APP_DEPLOY_MODE === "staging") return "https://dev.slmn.gg"; + if (process.env.NODE_ENV === "production") return "https://live.slmn.gg"; + if (process.env.VUE_APP_DEPLOY_MODE === "production") return "http://live.slmn.gg"; + return "http://dev.slmn.gg"; + } else { + return window.location.origin.replace(`${this.minisite.subdomain}.`, ""); } - if (process.env.VUE_APP_DEPLOY_MODE === "live") return "https://live.slmn.gg"; - // if (process.env.VUE_APP_DEPLOY_MODE === "staging") return "https://dev.slmn.gg"; - return "https://dev.slmn.gg"; } catch (e) { return "https://dev.slmn.gg"; }