dify/web/app/components/swr-initor.tsx

22 lines
333 B
TypeScript
Raw Normal View History

2023-06-29 15:30:12 +08:00
'use client'
import { SWRConfig } from 'swr'
import type { ReactNode } from 'react'
type SwrInitorProps = {
children: ReactNode
}
const SwrInitor = ({
children,
}: SwrInitorProps) => {
return (
<SWRConfig value={{
shouldRetryOnError: false,
}}>
{children}
</SWRConfig>
)
}
export default SwrInitor