Skip to content

Commit

Permalink
fix(hoc): fix issue with props not pass
Browse files Browse the repository at this point in the history
  • Loading branch information
EQuimper committed May 7, 2024
1 parent c0829f1 commit 2182d41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/withSmartScroll.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from 'react';
import SmartScrollView from './Provider';
import { Provider } from 'jotai';

export const withSmartScroll = (child: () => React.ReactElement) => {
return () => (
export const withSmartScroll = (child: (props?: any) => React.ReactElement) => {
return (props?: any) => (
<Provider>
<SmartScrollView>{child()}</SmartScrollView>
<SmartScrollView>{child(props)}</SmartScrollView>
</Provider>
);
};

0 comments on commit 2182d41

Please sign in to comment.