Skip to content

Commit 42fda7b

Browse files
committed
drop SWRConfig from the compat rq variant
1 parent 94ef80b commit 42fda7b

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import React from 'react';
2-
import { SWRConfig } from 'swr';
2+
3+
import { SWRConfigCompat } from '../../providers/SWRConfigCompat';
34

45
export 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
);
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import type { PropsWithChildren } from 'react';
22
import 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
}

0 commit comments

Comments
 (0)