import React, { SyntheticEvent, useRef, useEffect } from "react"; import styles from "./scroll.module.css"; export const Scroll: React.FC<{ scroll: number; ganttHeight: number; ganttFullHeight: number; headerHeight: number; onScroll: (event: SyntheticEvent) => void; }> = ({ scroll, ganttHeight, ganttFullHeight, headerHeight, onScroll }) => { const scrollRef = useRef(null); useEffect(() => { if (scrollRef.current) { scrollRef.current.scrollTop = scroll; } }, [scroll]); return (
); };