add timeout
This commit is contained in:
parent
baa263d364
commit
75167ae9e7
@ -6,6 +6,7 @@ export function requestCore<DataT>(url: string, options: UseFetchOptions<DataT>)
|
|||||||
return useFetch(url, {
|
return useFetch(url, {
|
||||||
baseURL: "https://cantyonion.site",
|
baseURL: "https://cantyonion.site",
|
||||||
retry: false,
|
retry: false,
|
||||||
|
timeout: 3000,
|
||||||
onRequest({ options }) {
|
onRequest({ options }) {
|
||||||
let token: string = ""
|
let token: string = ""
|
||||||
if (import.meta.client) {
|
if (import.meta.client) {
|
||||||
|
@ -73,8 +73,7 @@ const reloadActivities = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await reloadPosts()
|
await Promise.all([reloadPosts(), reloadActivities()])
|
||||||
await reloadActivities()
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
$mitt.emit('startLoading', false)
|
$mitt.emit('startLoading', false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user