四好公路
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.
 
 
 
 

35 lines
932 B

import React, { useEffect, useState } from 'react'
import Left from './left'
import Right from './right'
import { connect } from 'react-redux'
import { getdaolutongji } from '../../../actions/example'
const Conserve = (props) => {
const [roadData, setRoadData] = useState()
const [loading, setLoading] = useState(true)
const { dispatch } = props
useEffect(() => {
dispatch(getdaolutongji()).then(res => {
setLoading(false)
setRoadData(res.payload.data || {})
})
}, [])
return (
<div style={{ display: 'flex', width: '100%', height: '100%', justifyContent: 'space-between' }}>
<Left roadData={roadData} loading={loading} />
<Right roadData={roadData} loading={loading} />
</div>
)
}
function mapStateToProps(state) {
// const { auth } = state;
return {
}
}
export default connect(mapStateToProps)(Conserve)