Skip to content

Commit

Permalink
Consolidate some of the env testing for dev site
Browse files Browse the repository at this point in the history
  • Loading branch information
slmnio committed Jan 18, 2022
1 parent 102716b commit d93e022
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions website/src/views/Event.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,9 @@ export default {
if (!this.event) return null;
try {
if (process.env.NODE_ENV === "development") return `http://${this.subdomain}.localhost:8080`;
if (process.env.VUE_APP_DEPLOY_MODE === "local") return `http://${this.subdomain}.localhost:8080`;
if (process.env.VUE_APP_DEPLOY_MODE === "staging") return `https://${this.subdomain}.dev.slmn.gg`;
if (process.env.NODE_ENV === "production") return `https://${this.subdomain}.slmn.gg`;
if (process.env.VUE_APP_DEPLOY_MODE === "production") return `https://${this.subdomain}.slmn.gg`;
if ([process.env.VUE_APP_DEPLOY_MODE, process.env.NODE_ENV].includes("staging")) return `https://${this.subdomain}.dev.slmn.gg`;
if (process.env.NODE_ENV === "development" || process.env.VUE_APP_DEPLOY_MODE === "local") return `http://${this.subdomain}.localhost:8080`;
if ([process.env.VUE_APP_DEPLOY_MODE, process.env.NODE_ENV].includes("production")) return `https://${this.subdomain}.slmn.gg`;
return null;
} catch (e) {
return null;
Expand Down

0 comments on commit d93e022

Please sign in to comment.