| | |
| | | const [activeTabKey, setActiveTabKey] = useState('view'); |
| | | const [curNo, setCurNo] = React.useState(''); // just used to modify the drawer title |
| | | |
| | | props.setDrawerWidth(window.innerWidth * 0.4); |
| | | |
| | | useEffect(() => { |
| | | if (!curSprite) { |
| | | return |
| | | } |
| | | props.setDrawerTitle(intl.formatMessage({ id: 'map.shuttle.no', defaultMessage: '穿梭车号' }) + ': ' + curNo); |
| | | const deviceNo = curSprite?.data?.no; |
| | | props.setDrawerTitle(intl.formatMessage({ id: 'map.shuttle.no', defaultMessage: '穿梭车号' }) + ': ' + deviceNo); |
| | | setCurNo(deviceNo) |
| | | }, [curNo]); |
| | | |
| | | const contentList = { |
| | |
| | | curNo={curNo} |
| | | data={curSprite.data} |
| | | curFloor={curFloor} |
| | | refCurr={props.refCurr} |
| | | /> |
| | | ), |
| | | json: ( |