refact common layout (#490)

This commit is contained in:
zxhlyh
2023-06-29 15:30:12 +08:00
committed by GitHub
parent da04ff040b
commit 39ea967b30
8 changed files with 150 additions and 153 deletions

View File

@@ -0,0 +1,21 @@
'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