diff --git a/webclient/components/AppSearchBar.vue b/webclient/components/AppSearchBar.vue index 3c753537e..efb100688 100644 --- a/webclient/components/AppSearchBar.vue +++ b/webclient/components/AppSearchBar.vue @@ -114,7 +114,7 @@ const url = computed(() => { return `${runtimeConfig.public.apiURL}/api/search?${params.toString()}`; }); -const { data, error, refresh } = await useFetch(url, {}); +const { data, error, refresh } = await useFetch(url, { key: "search", dedupe: "defer", deep: false }); // a bit crude way of doing retries, but likely fine watchEffect(() => { if (query.value.length && error.value !== null) setTimeout(refresh, 500); diff --git a/webclient/pages/[view]/[id].vue b/webclient/pages/[view]/[id].vue index fd86e0873..f232ee0b8 100644 --- a/webclient/pages/[view]/[id].vue +++ b/webclient/pages/[view]/[id].vue @@ -21,7 +21,7 @@ const router = useRouter(); const runtimeConfig = useRuntimeConfig(); const url = computed(() => `${runtimeConfig.public.apiURL}/api/get/${route.params.id}?lang=${locale.value}`); -const { data, error } = useFetch(url, { key: "details" }); +const { data, error } = useFetch(url, { key: "details", dedupe: "defer", deep: false }); const shownImage = ref(data.value?.imgs?.length ? data.value.imgs[0] : undefined); const slideshowOpen = ref(false); diff --git a/webclient/pages/search.vue b/webclient/pages/search.vue index f7dd17c3c..4f5e91f1f 100644 --- a/webclient/pages/search.vue +++ b/webclient/pages/search.vue @@ -29,7 +29,7 @@ const apiUrl = computed(() => { return `${runtimeConfig.public.apiURL}/api/search?${params.toString()}`; }); -const { data } = useFetch(apiUrl, {}); +const { data } = useFetch(apiUrl, { key: "search", dedupe: "defer", deep: false }); const description = computed(() => { if (data.value === null) return ""; let sectionsDescr = "";