Scroll smoothly to an element, in the page or inside a container.
This is custom React hooks, you need to follow the Basic Rules when you use it.
Scroll the box down to the last item.
const useScrollIntoView = <
T extends HTMLElement = HTMLElement,
C extends HTMLElement = HTMLElement,
>(options?: { duration?: number; offset?: number }) => {
targetRef: RefObject<T | null>
scrollableRef: RefObject<C | null>
scrollIntoView: () => void
cancel: () => void
}