disable swr revalidation on LogPage

This commit is contained in:
TzeYiing committed 2021-11-30 02:08:16 +08:00
1 parent fe54ccaa5e
commit 07b917ab52
1 file changed
+4 -2
@@ -28,8 +28,10 @@ const LogPage = () => {
data,
isValidating: isLoading,
mutate,
} = useSWR<{ data: LogsResponse, error: any }>(`${API_URL}/projects/${ref}/logs?type=${type}`, get)
} = useSWR<{ data: LogsResponse, error: any }>(`${API_URL}/projects/${ref}/logs?type=${type}`, get, {
revalidateOnFocus: false,
})
console.log(data)
const { data: logData, error } = data || {}
return (
<SettingsLayout title={title} className="p-4">