Files
boursecu_admin/src/utils/config.ts
T

19 lines
432 B
TypeScript
Raw Normal View History

2026-01-24 17:45:54 +03:30
export function getConfigApp(key: string) {
const config = window.__APP_CONFIG__ ? window.__APP_CONFIG__.user:{}
if (config) {
return config[key]
}
return null
}
2026-06-11 22:29:28 +03:30
export function isStoreApp(): boolean {
const value = getConfigApp('is_store')
if (value === true || value === 1) return true
if (typeof value === 'string') {
return ['true', '1', 'yes'].includes(value.trim().toLowerCase())
}
return false
}