import React from "react";
import { SWRConfig } from "swr";

type Props = {
  children: React.ReactNode;
};

export function SWRProvider({ children }: Props) {
  return (
    <SWRConfig
      value={{
        revalidateOnFocus: true,
        revalidateOnReconnect: true,
        shouldRetryOnError: true,
        errorRetryCount: 3,
      }}
    >
      {children}
    </SWRConfig>
  );
}
