镜像自地址
https://github.com/karl0ss/homepage.git
已同步 2025-10-30 05:54:05 +00:00
preserve swr mutate
这个提交包含在:
父节点
64b43871c6
当前提交
379d2e59f1
@ -7,7 +7,7 @@ export default function useWidgetAPI(widget, ...options) {
|
||||
if (options && options[1]?.refreshInterval) {
|
||||
config.refreshInterval = options[1].refreshInterval;
|
||||
}
|
||||
const { data, error } = useSWR(formatProxyUrl(widget, ...options), config);
|
||||
const { data, error, mutate } = useSWR(formatProxyUrl(widget, ...options), config);
|
||||
// make the data error the top-level error
|
||||
return { data, error: data?.error ?? error }
|
||||
return { data, error: data?.error ?? error, mutate }
|
||||
}
|
||||
|
||||
正在加载...
x
在新工单中引用
屏蔽一个用户