diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index c71a0a887..7329ddae2 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -18,18 +18,15 @@ const state = useState(); const user = state.getUser(); const appName = 'Lilium'; const pinnedModulesRef = ref(); -const env = process.env.NODE_ENV; +const hostname = window.location.hostname; +const env = ref(); const getEnvironment = computed(() => { - switch (env) { - case 'development': - return 'DEV'; - case 'production': - return null; - default: - return env; - } + env.value = hostname.split('-'); + if (env.value.length <= 1) return; + return env.value[0]; }); + onMounted(() => stateStore.setMounted()); const refresh = () => window.location.reload();