Subscribe to window scroll and scroll smoothly to given position
use-window-scroll returns current scroll position and a function to scroll smoothly to given position:
Scroll position x: 0, y: 0
function useWindowScroll(): readonly [ { x: number; y: number }, (position: { x?: number; y?: number }) => void, ];