import React, { useState } from 'react'; import { Button, Divider, Image, Modal } from 'antd'; const App: React.FC = () => { const [show1, setShow1] = useState(false); const [show2, setShow2] = useState(false); const [show3, setShow3] = useState(false); return ( <> { setShow1(open); }} onCancel={() => { setShow1(false); }} > { setShow2(open); }} onCancel={() => { setShow2(false); }} > { setShow3(open); }} onCancel={() => { setShow3(false); }} > console.log(`current index: ${current}, prev index: ${prev}`), }} > ); }; export default App;