@@ -29,7 +29,7 @@ export function useTimezones() {
|
||||
loading,
|
||||
} = useQuery<{
|
||||
config: Pick<IConfig, "timezones">;
|
||||
}>(TIMEZONES);
|
||||
}>(TIMEZONES, undefined, { fetchPolicy: "cache-first" });
|
||||
|
||||
const timezones = computed(() => timezoneResult.value?.config?.timezones);
|
||||
return { timezones, error, loading };
|
||||
@@ -42,7 +42,7 @@ export function useAnonymousParticipationConfig() {
|
||||
loading,
|
||||
} = useQuery<{
|
||||
config: Pick<IConfig, "anonymous">;
|
||||
}>(ANONYMOUS_PARTICIPATION_CONFIG);
|
||||
}>(ANONYMOUS_PARTICIPATION_CONFIG, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const anonymousParticipationConfig = computed(
|
||||
() => configResult.value?.config?.anonymous?.participation
|
||||
@@ -58,7 +58,7 @@ export function useAnonymousReportsConfig() {
|
||||
loading,
|
||||
} = useQuery<{
|
||||
config: Pick<IConfig, "anonymous">;
|
||||
}>(ANONYMOUS_REPORTS_CONFIG);
|
||||
}>(ANONYMOUS_REPORTS_CONFIG, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const anonymousReportsConfig = computed(
|
||||
() => configResult.value?.config?.anonymous?.participation
|
||||
@@ -69,7 +69,7 @@ export function useAnonymousReportsConfig() {
|
||||
export function useInstanceName() {
|
||||
const { result, error, loading } = useQuery<{
|
||||
config: Pick<IConfig, "name">;
|
||||
}>(ABOUT);
|
||||
}>(ABOUT, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const instanceName = computed(() => result.value?.config?.name);
|
||||
return { instanceName, error, loading };
|
||||
@@ -78,7 +78,7 @@ export function useInstanceName() {
|
||||
export function useAnonymousActorId() {
|
||||
const { result, error, loading } = useQuery<{
|
||||
config: Pick<IConfig, "anonymous">;
|
||||
}>(ANONYMOUS_ACTOR_ID);
|
||||
}>(ANONYMOUS_ACTOR_ID, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const anonymousActorId = computed(
|
||||
() => result.value?.config?.anonymous?.actorId
|
||||
@@ -89,7 +89,7 @@ export function useAnonymousActorId() {
|
||||
export function useUploadLimits() {
|
||||
const { result, error, loading } = useQuery<{
|
||||
config: Pick<IConfig, "uploadLimits">;
|
||||
}>(UPLOAD_LIMITS);
|
||||
}>(UPLOAD_LIMITS, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const uploadLimits = computed(() => result.value?.config?.uploadLimits);
|
||||
return { uploadLimits, error, loading };
|
||||
@@ -98,7 +98,7 @@ export function useUploadLimits() {
|
||||
export function useEventCategories() {
|
||||
const { result, error, loading } = useQuery<{
|
||||
config: Pick<IConfig, "eventCategories">;
|
||||
}>(EVENT_CATEGORIES);
|
||||
}>(EVENT_CATEGORIES, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const eventCategories = computed(() => result.value?.config.eventCategories);
|
||||
return { eventCategories, error, loading };
|
||||
@@ -107,7 +107,7 @@ export function useEventCategories() {
|
||||
export function useRestrictions() {
|
||||
const { result, error, loading } = useQuery<{
|
||||
config: Pick<IConfig, "restrictions">;
|
||||
}>(RESTRICTIONS);
|
||||
}>(RESTRICTIONS, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const restrictions = computed(() => result.value?.config.restrictions);
|
||||
return { restrictions, error, loading };
|
||||
@@ -116,7 +116,7 @@ export function useRestrictions() {
|
||||
export function useExportFormats() {
|
||||
const { result, error, loading } = useQuery<{
|
||||
config: Pick<IConfig, "exportFormats">;
|
||||
}>(EVENT_PARTICIPANTS);
|
||||
}>(EVENT_PARTICIPANTS, undefined, { fetchPolicy: "cache-only" });
|
||||
const exportFormats = computed(() => result.value?.config?.exportFormats);
|
||||
return { exportFormats, error, loading };
|
||||
}
|
||||
@@ -124,7 +124,7 @@ export function useExportFormats() {
|
||||
export function useGeocodingAutocomplete() {
|
||||
const { result, error, loading } = useQuery<{
|
||||
config: Pick<IConfig, "geocoding">;
|
||||
}>(GEOCODING_AUTOCOMPLETE);
|
||||
}>(GEOCODING_AUTOCOMPLETE, undefined, { fetchPolicy: "cache-only" });
|
||||
const geocodingAutocomplete = computed(
|
||||
() => result.value?.config?.geocoding?.autocomplete
|
||||
);
|
||||
@@ -134,7 +134,7 @@ export function useGeocodingAutocomplete() {
|
||||
export function useMapTiles() {
|
||||
const { result, error, loading } = useQuery<{
|
||||
config: Pick<IConfig, "maps">;
|
||||
}>(MAPS_TILES);
|
||||
}>(MAPS_TILES, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const tiles = computed(() => result.value?.config.maps.tiles);
|
||||
return { tiles, error, loading };
|
||||
@@ -143,7 +143,7 @@ export function useMapTiles() {
|
||||
export function useRoutingType() {
|
||||
const { result, error, loading } = useQuery<{
|
||||
config: Pick<IConfig, "maps">;
|
||||
}>(ROUTING_TYPE);
|
||||
}>(ROUTING_TYPE, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const routingType = computed(() => result.value?.config.maps.routing.type);
|
||||
return { routingType, error, loading };
|
||||
@@ -152,7 +152,7 @@ export function useRoutingType() {
|
||||
export function useFeatures() {
|
||||
const { result, error, loading } = useQuery<{
|
||||
config: Pick<IConfig, "features">;
|
||||
}>(FEATURES);
|
||||
}>(FEATURES, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const features = computed(() => result.value?.config.features);
|
||||
return { features, error, loading };
|
||||
@@ -161,7 +161,7 @@ export function useFeatures() {
|
||||
export function useResourceProviders() {
|
||||
const { result, error, loading } = useQuery<{
|
||||
config: Pick<IConfig, "resourceProviders">;
|
||||
}>(RESOURCE_PROVIDERS);
|
||||
}>(RESOURCE_PROVIDERS, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const resourceProviders = computed(
|
||||
() => result.value?.config.resourceProviders
|
||||
@@ -172,7 +172,7 @@ export function useResourceProviders() {
|
||||
export function useServerProvidedLocation() {
|
||||
const { result, error, loading } = useQuery<{
|
||||
config: Pick<IConfig, "location">;
|
||||
}>(LOCATION);
|
||||
}>(LOCATION, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const location = computed(() => result.value?.config.location);
|
||||
return { location, error, loading };
|
||||
@@ -181,7 +181,7 @@ export function useServerProvidedLocation() {
|
||||
export function useIsDemoMode() {
|
||||
const { result, error, loading } = useQuery<{
|
||||
config: Pick<IConfig, "demoMode">;
|
||||
}>(DEMO_MODE);
|
||||
}>(DEMO_MODE, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const isDemoMode = computed(() => result.value?.config.demoMode);
|
||||
return { isDemoMode, error, loading };
|
||||
@@ -190,7 +190,7 @@ export function useIsDemoMode() {
|
||||
export function useAnalytics() {
|
||||
const { result, error, loading } = useQuery<{
|
||||
config: Pick<IConfig, "analytics">;
|
||||
}>(ANALYTICS);
|
||||
}>(ANALYTICS, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const analytics = computed(() => result.value?.config.analytics);
|
||||
return { analytics, error, loading };
|
||||
@@ -199,7 +199,7 @@ export function useAnalytics() {
|
||||
export function useSearchConfig() {
|
||||
const { result, error, loading, onResult } = useQuery<{
|
||||
config: Pick<IConfig, "search">;
|
||||
}>(SEARCH_CONFIG);
|
||||
}>(SEARCH_CONFIG, undefined, { fetchPolicy: "cache-only" });
|
||||
|
||||
const searchConfig = computed(() => result.value?.config.search);
|
||||
return { searchConfig, error, loading, onResult };
|
||||
|
||||
Reference in New Issue
Block a user