Consolidate UI configuration in one place, allowing it to be overridden from the server

This commit is contained in:
Deluan
2020-04-07 16:58:02 -04:00
committed by Deluan Quintão
parent d0188db4f9
commit a0f389fc3e
4 changed files with 28 additions and 4 deletions
+3 -1
View File
@@ -1,5 +1,7 @@
import config from '../config'
const baseUrl = (path) => {
const base = localStorage.getItem('baseURL') || ''
const base = config.baseURL || ''
const parts = [base]
parts.push(path.replace(/^\//, ''))
return parts.join('/')