fix: 移除 getCachedData 避免预渲染页面 hydration 失败导致 500
这个提交包含在:
父节点
8832762e51
当前提交
ab49633b81
@ -14,8 +14,6 @@
|
|||||||
export function usePublicApi(endpoint, options = {}) {
|
export function usePublicApi(endpoint, options = {}) {
|
||||||
return useFetch(`/api/content/${endpoint}`, {
|
return useFetch(`/api/content/${endpoint}`, {
|
||||||
key: `public-${endpoint}`,
|
key: `public-${endpoint}`,
|
||||||
// 客户端导航时重新请求接口,不使用 payload 缓存
|
|
||||||
getCachedData: () => undefined,
|
|
||||||
...options,
|
...options,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
正在加载...
x
在新工单中引用
屏蔽一个用户