Consolidate UI configuration in one place, allowing it to be overridden from the server
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
const defaultConfig = {
|
||||
firstTime: false,
|
||||
baseURL: '',
|
||||
loginBackgroundURL: 'https://source.unsplash.com/random/1600x900?music'
|
||||
}
|
||||
|
||||
let config
|
||||
|
||||
try {
|
||||
const appConfig = JSON.parse(window.__APP_CONFIG__)
|
||||
|
||||
config = {
|
||||
...defaultConfig,
|
||||
...appConfig
|
||||
}
|
||||
} catch (e) {
|
||||
config = defaultConfig
|
||||
}
|
||||
|
||||
export default config
|
||||
Reference in New Issue
Block a user