import React, { useMemo, useState } from 'react'; import { Button, Divider, Segmented, Tooltip } from 'antd'; const text = prompt text; const buttonWidth = 70; const App: React.FC = () => { const [showArrow, setShowArrow] = useState(true); const [arrowAtCenter, setArrowAtCenter] = useState(false); const mergedArrow = useMemo(() => { if (arrowAtCenter) return { arrowPointAtCenter: true }; return showArrow; }, [showArrow, arrowAtCenter]); return (