import React, { useEffect, useState } from 'react'; import { Anchor } from 'antd'; const { Link } = Anchor; const App: React.FC = () => { const [targetOffset, setTargetOffset] = useState(undefined); useEffect(() => { setTargetOffset(window.innerHeight / 2); }, []); return ( ); }; export default App;