You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
851 B
32 lines
851 B
import React, { useEffect, useState } from 'react'
|
|
import Left from './left'
|
|
import Right from './right'
|
|
import { connect } from 'react-redux'
|
|
import { getBusTierList } from '../../../actions/example'
|
|
|
|
const Operation = (props) => {
|
|
|
|
const [roadData, setRoadData] = useState()
|
|
const [loading, setLoading] = useState(true)
|
|
const { dispatch } = props
|
|
useEffect(() => {
|
|
dispatch(getBusTierList()).then(res => {
|
|
setLoading(false)
|
|
setRoadData(res.payload.data || {})
|
|
})
|
|
}, [])
|
|
|
|
return (
|
|
<div style={{ width: '100%', height: '100%' }}>
|
|
<Left roadData={roadData} loading={loading} />
|
|
<Right roadData={roadData} loading={loading} />
|
|
</div>
|
|
)
|
|
}
|
|
function mapStateToProps(state) {
|
|
|
|
return {
|
|
|
|
}
|
|
}
|
|
export default connect(mapStateToProps)(Operation)
|