Use modal instead of modal context
This commit is contained in:
1 parent
fe687cd2f9
commit
ec7337e801
3 files changed
+5
-4
No files matched your search
@@ -111,7 +111,8 @@ ModalProvider.propTypes = {
|
||||
*/
|
||||
export const withModal = Component => {
|
||||
return function WrappedComponent(props) {
|
||||
return <Component {...props} modalContext={{ ...useModal() }} />;
|
||||
const { show, hide } = useModal();
|
||||
return <Component {...props} modal={{ show, hide }} />;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user