Langchain-Chatchat/frontend/tests/utils.tsx

12 lines
273 B
TypeScript
Raw Normal View History

2024-12-20 16:04:03 +08:00
import { PropsWithChildren } from 'react';
import { SWRConfig } from 'swr';
// 全局的 SWR 配置
const swrConfig = {
provider: () => new Map(),
};
export const withSWR = ({ children }: PropsWithChildren) => (
<SWRConfig value={swrConfig}>{children}</SWRConfig>
);