"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useScrollTop = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var react_router_dom_1 = require("react-router-dom");
var adapter_1 = require("./adapter");
function useScrollTop() {
    var pathname = (0, react_router_dom_1.useLocation)().pathname;
    React.useEffect(function () {
        adapter_1.runtime === null || adapter_1.runtime === void 0 ? void 0 : adapter_1.runtime.scrollTo(0, 0);
    }, [pathname]);
    return null;
}
exports.useScrollTop = useScrollTop;
//# sourceMappingURL=hooks.js.map