mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-03 03:38:08 +08:00
22 lines
333 B
TypeScript
22 lines
333 B
TypeScript
'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
|