refact common layout (#490)

This commit is contained in:
zxhlyh 2023-06-29 15:30:12 +08:00 • committed by GitHub
commit 39ea967b30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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