Jack Mallers
7 years ago
4 changed files with 116 additions and 5 deletions
@ -0,0 +1,42 @@ |
|||
@import '../../../variables.scss'; |
|||
|
|||
.search { |
|||
height: 75px; |
|||
padding: 2px 25px; |
|||
border-bottom: 1px solid $darkgrey; |
|||
background: $white; |
|||
|
|||
.input { |
|||
display: inline-block; |
|||
vertical-align: top; |
|||
height: 100%; |
|||
} |
|||
|
|||
.label { |
|||
width: 5%; |
|||
line-height: 70px; |
|||
font-size: 25px; |
|||
text-align: center; |
|||
cursor: pointer; |
|||
} |
|||
|
|||
.text { |
|||
width: 95%; |
|||
outline: 0; |
|||
padding: 0; |
|||
border: 0; |
|||
border-radius: 0; |
|||
height: 68px; |
|||
font-size: 18px; |
|||
} |
|||
} |
|||
|
|||
.header { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: flex-end; |
|||
|
|||
.addPeerContainer { |
|||
padding: 40px; |
|||
} |
|||
} |
@ -1,14 +1,45 @@ |
|||
import { withRouter } from 'react-router' |
|||
import { connect } from 'react-redux' |
|||
|
|||
import { |
|||
fetchPeers, |
|||
setPeer, |
|||
peersSelectors, |
|||
setPeerForm, |
|||
connectRequest, |
|||
disconnectRequest |
|||
} from 'reducers/peers' |
|||
|
|||
import Peers from '../components/Peers' |
|||
|
|||
const mapDispatchToProps = { |
|||
|
|||
fetchPeers, |
|||
setPeer, |
|||
peersSelectors, |
|||
setPeerForm, |
|||
connectRequest, |
|||
disconnectRequest |
|||
} |
|||
|
|||
const mapStateToProps = state => ({ |
|||
peers: state.peers |
|||
}) |
|||
|
|||
export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Peers)) |
|||
const mergeProps = (stateProps, dispatchProps, ownProps) => { |
|||
const peerFormProps = { |
|||
setForm: dispatchProps.setPeerForm, |
|||
connect: dispatchProps.connectRequest, |
|||
|
|||
form: stateProps.peers.peerForm |
|||
} |
|||
|
|||
return { |
|||
...stateProps, |
|||
...dispatchProps, |
|||
...ownProps, |
|||
|
|||
peerFormProps |
|||
} |
|||
} |
|||
|
|||
export default withRouter(connect(mapStateToProps, mapDispatchToProps, mergeProps)(Peers)) |
|||
|
Loading…
Reference in new issue