Skip to content

Commit

Permalink
More changes to the "back to SLMN.GG" URL
Browse files Browse the repository at this point in the history
  • Loading branch information
slmnio committed Aug 18, 2021
1 parent 1280df2 commit 8ba87e2
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions website/src/components/website/WebsiteNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down

0 comments on commit 8ba87e2

Please sign in to comment.