react pass function with parameter as prop functional component