parent
4852afcad7
commit
bba2ab98b6
@ -1,25 +0,0 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
|
||||
function withCurrentPage(WrappedComponent) {
|
||||
function CurrentPage(props) {
|
||||
const {
|
||||
history
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<WrappedComponent
|
||||
{...props}
|
||||
useCurrentPage={history.action === 'POP'}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
CurrentPage.propTypes = {
|
||||
history: PropTypes.object.isRequired
|
||||
};
|
||||
|
||||
return CurrentPage;
|
||||
}
|
||||
|
||||
export default withCurrentPage;
|
Loading…
Reference in new issue