Skip to content

Commit

Permalink
chore: add isochrone feature flag from config #359
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab committed Oct 22, 2024
1 parent c05a4ea commit 12d30a4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions composables/useIsochrone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>('map-instance')
const profile = useState('isochrone-profile')
Expand Down
1 change: 1 addition & 0 deletions utils/types-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions vidos-config-cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions vidos-config-empty.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions vidos.config.sample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 12d30a4

Please sign in to comment.