import React, { useEffect, useState } from 'react'; import { Anchor, Row, Col } from 'antd'; const App: React.FC = () => { const topRef = React.useRef(null); const [targetOffset, setTargetOffset] = useState(undefined); useEffect(() => { setTargetOffset(topRef.current?.clientHeight); }, []); return (
Part 1
Part 2
Part 3
Fixed Top Block
); }; export default App;