From 2182d418630485f4d0a2ce5ac12020a862309cb4 Mon Sep 17 00:00:00 2001 From: Emanuel Quimper Date: Tue, 7 May 2024 14:04:20 -0400 Subject: [PATCH] fix(hoc): fix issue with props not pass --- src/withSmartScroll.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/withSmartScroll.tsx b/src/withSmartScroll.tsx index 6715b33..c1d77e5 100644 --- a/src/withSmartScroll.tsx +++ b/src/withSmartScroll.tsx @@ -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) => ( - {child()} + {child(props)} ); };