File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
packages/shared/src/react Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import { SWRConfig } from 'swr' ;
2+
3+ import { SWRConfigCompat } from '../../providers/SWRConfigCompat' ;
34
45export const wrapper = ( { children } : { children : React . ReactNode } ) => (
5- // TODO: Replace SWRConfig with the react-query equivalent.
6- < SWRConfig
7- value = { {
6+ < SWRConfigCompat
7+ swrConfig = { {
88 provider : ( ) => new Map ( ) ,
99 } }
1010 >
1111 { children }
12- </ SWRConfig >
12+ </ SWRConfigCompat >
1313) ;
Original file line number Diff line number Diff line change 11import type { PropsWithChildren } from 'react' ;
22import React from 'react' ;
3- import { SWRConfig } from 'swr' ;
4-
53/**
64 * @internal
75 */
8- export function SWRConfigCompat ( { swrConfig, children } : PropsWithChildren < { swrConfig ?: any } > ) {
9- // TODO: Replace SWRConfig with the react-query equivalent.
10- return < SWRConfig value = { swrConfig } > { children } </ SWRConfig > ;
6+ export function SWRConfigCompat ( { children } : PropsWithChildren < { swrConfig ?: any } > ) {
7+ return < > { children } </ > ;
118}
You can’t perform that action at this time.
0 commit comments