import { useEffect } from 'react';
import { usePrevious } from 'react-use';
var ScrollUp = function (props) {
    var prevLocation = usePrevious(props.location);
    useEffect(function () {
        if (prevLocation && prevLocation.pathname !== props.location.pathname) {
            window.scrollTo(0, 0);
        }
    }, [props.location, prevLocation]);
    return props.children;
};
export default ScrollUp;
//# sourceMappingURL=index.js.map