mirror of https://github.com/msgbyte/tailchat
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.
18 lines
433 B
TypeScript
18 lines
433 B
TypeScript
import React, { PropsWithChildren } from 'react';
|
|
import { QueryClientProvider } from '@tanstack/react-query';
|
|
import { queryClient } from './';
|
|
|
|
/**
|
|
* 缓存上下文
|
|
*/
|
|
export const CacheProvider: React.FC<PropsWithChildren> = React.memo(
|
|
(props) => {
|
|
return (
|
|
<QueryClientProvider client={queryClient}>
|
|
{props.children}
|
|
</QueryClientProvider>
|
|
);
|
|
}
|
|
);
|
|
CacheProvider.displayName = 'CacheProvider';
|