Skip to content

Commit 2182d41

Browse files
committed
fix(hoc): fix issue with props not pass
1 parent c0829f1 commit 2182d41

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/withSmartScroll.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import React from 'react';
22
import SmartScrollView from './Provider';
33
import { Provider } from 'jotai';
44

5-
export const withSmartScroll = (child: () => React.ReactElement) => {
6-
return () => (
5+
export const withSmartScroll = (child: (props?: any) => React.ReactElement) => {
6+
return (props?: any) => (
77
<Provider>
8-
<SmartScrollView>{child()}</SmartScrollView>
8+
<SmartScrollView>{child(props)}</SmartScrollView>
99
</Provider>
1010
);
1111
};

0 commit comments

Comments
 (0)