You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import { PropsWithChildren } from 'react';
|
|
import { SWRConfig } from 'swr';
|
|
|
|
// 全局的 SWR 配置
|
|
const swrConfig = {
|
|
provider: () => new Map(),
|
|
};
|
|
|
|
export const withSWR = ({ children }: PropsWithChildren) => (
|
|
<SWRConfig value={swrConfig}>{children}</SWRConfig>
|
|
);
|