diff --git a/composables/network.ts b/composables/network.ts index 984b7fb..ca4608f 100644 --- a/composables/network.ts +++ b/composables/network.ts @@ -6,6 +6,7 @@ export function requestCore(url: string, options: UseFetchOptions) return useFetch(url, { baseURL: "https://cantyonion.site", retry: false, + timeout: 3000, onRequest({ options }) { let token: string = "" if (import.meta.client) { diff --git a/pages/index.vue b/pages/index.vue index 782e075..f79afcb 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -73,8 +73,7 @@ const reloadActivities = async () => { } } -await reloadPosts() -await reloadActivities() +await Promise.all([reloadPosts(), reloadActivities()]) onMounted(() => { $mitt.emit('startLoading', false)