import React, { useEffect, useRef } from 'react';
import { getElementOffset, useScrollTo } from '@sentecacommerce-theme/lib';
export var ScrollToOnRender = () => {
  var containerRef = useRef(null);
  var {
    scrollTo
  } = useScrollTo(containerRef.current || undefined, 2);
  useEffect(() => {
    setTimeout(() => {
      if (!containerRef.current) return;
      scrollTo(getElementOffset(containerRef.current).top);
    }, 50);
  }, []);
  return /*#__PURE__*/React.createElement("div", {
    ref: containerRef
  });
};
//# sourceMappingURL=index.js.map