Sync live quote handling, SSE product images, store hours, file URL normalization, PWA icon cache, TV monitor, about software, SuperAdmin menu gates, price alerts, and related UX from modular while preserving boursecu branding and config constraints. Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
569 B
TypeScript
22 lines
569 B
TypeScript
import { onMounted, ref } from 'vue'
|
|
import { fetchTrackingSettings, isTrackingSystemsEnabled } from '@/utils/trackingSystemsSettings'
|
|
|
|
export function useTrackingSystemsFeature() {
|
|
const trackingSystemsEnabled = ref(false)
|
|
const trackingSystemsReady = ref(false)
|
|
|
|
onMounted(async () => {
|
|
try {
|
|
const settings = await fetchTrackingSettings()
|
|
trackingSystemsEnabled.value = isTrackingSystemsEnabled(settings)
|
|
} finally {
|
|
trackingSystemsReady.value = true
|
|
}
|
|
})
|
|
|
|
return {
|
|
trackingSystemsEnabled,
|
|
trackingSystemsReady,
|
|
}
|
|
}
|