diff --git a/composables/useIsochrone.ts b/composables/useIsochrone.ts index c3bd185a..5d2b8782 100644 --- a/composables/useIsochrone.ts +++ b/composables/useIsochrone.ts @@ -25,10 +25,10 @@ export default function useIsochrone() { // // Composables // - const { config, settings } = useSiteStore() + const { config } = useSiteStore() const mapStore = useMapStore() // Get feature flag for Vido config - const enabled = (config?.OPEN_ROUTE_SERVICE_KEY && settings?.themes[0].isochroneEnabled) || false + const enabled = (config?.OPEN_ROUTE_SERVICE_KEY && config?.ISOCHRONE) || false const { t, locale } = useI18n() const map = useState('map-instance') const profile = useState('isochrone-profile') diff --git a/utils/types-config.ts b/utils/types-config.ts index 72f620ad..4c5c5096 100644 --- a/utils/types-config.ts +++ b/utils/types-config.ts @@ -13,6 +13,7 @@ export interface VidoConfig { IMAGE_PROXY: string[] | null MAPILLARY_ACCESS_TOKEN: string | null OPEN_ROUTE_SERVICE_KEY: string | null + ISOCHRONE: boolean COOKIES_CONSENT: string | null COOKIES_LINK: string | null GOOGLE_SITE_VERIFICATION: string | undefined diff --git a/vidos-config-cypress.json b/vidos-config-cypress.json index 327e74d7..06a239b6 100644 --- a/vidos-config-cypress.json +++ b/vidos-config-cypress.json @@ -13,6 +13,7 @@ ], "MAPILLARY_ACCESS_TOKEN": "MLY|5609419529131330|36d86a5578fecba521c1ffe033bda2fc", "OPEN_ROUTE_SERVICE_KEY": "5b3ce3597851110001cf6248e176e3d24c3d4a71bff8701252700040", + "ISOCHRONE": false, "COOKIES_CONSENT": null, "COOKIES_LINK": null, "GOOGLE_TAG_MANAGER_ID": null, diff --git a/vidos-config-empty.json b/vidos-config-empty.json index 5eb55661..62d43645 100644 --- a/vidos-config-empty.json +++ b/vidos-config-empty.json @@ -13,6 +13,7 @@ ], "MAPILLARY_ACCESS_TOKEN": "MLY|5609419529131330|36d86a5578fecba521c1ffe033bda2fc", "OPEN_ROUTE_SERVICE_KEY": "5b3ce3597851110001cf6248e176e3d24c3d4a71bff8701252700040", + "ISOCHRONE": false, "SENTRY_DSN": null, "COOKIES_CONSENT": null, "COOKIES_LINK": null, diff --git a/vidos.config.sample.ts b/vidos.config.sample.ts index aa9470ab..71a7e2b2 100644 --- a/vidos.config.sample.ts +++ b/vidos.config.sample.ts @@ -8,6 +8,7 @@ const configDefault = { IMAGE_PROXY: null, MAPILLARY_ACCESS_TOKEN: null, OPEN_ROUTE_SERVICE_KEY: null, + ISOCHRONE: false, SENTRY_DSN: null, COOKIES_CONSENT: null, COOKIES_LINK: null,