Files
mcpedia/apps/web/app/lib/swr.tsx
T

19 lines
397 B
TypeScript
Raw Normal View History

"use client";
import { SWRConfig } from "swr";
export default function SWRProvider({ children }: { children: React.ReactNode }) {
return (
<SWRConfig
value={{
dedupingInterval: 4_000,
focusThrottleInterval: 10_000,
revalidateOnFocus: true,
shouldRetryOnError: false,
errorRetryCount: 0,
}}
>
{children}
</SWRConfig>
);
}