diff --git a/app/routes/friends/components/Friends.js b/app/routes/friends/components/Friends.js
index f29f775a..4a75b493 100644
--- a/app/routes/friends/components/Friends.js
+++ b/app/routes/friends/components/Friends.js
@@ -29,13 +29,14 @@ class Friends extends Component {
render() {
const {
- channels,
+ channels: { searchQuery },
currentChannels,
activeChannels,
nonActiveChannels,
pendingOpenChannels,
closingPendingChannels,
+ updateChannelSearchQuery,
openFriendsForm,
friendsFormProps,
@@ -66,8 +67,8 @@ class Friends extends Component {
console.log('event: ', event)}
+ value={searchQuery}
+ onChange={event => updateChannelSearchQuery(event.target.value)}
className={`${styles.text} ${styles.input}`}
placeholder='Search your friends list...'
type='text'
@@ -77,17 +78,17 @@ class Friends extends Component {
{
- currentChannels.length > 0 && currentChannels.map(channel => {
+ currentChannels.length > 0 && currentChannels.map((channel, index) => {
console.log('channel: ', channel)
if (channel.active) {
- return
+ return
} else if (!channel.active) {
- return
+ return
} else if (Object.prototype.hasOwnProperty.call(channel, 'blocks_till_open')) {
- return
+ return
} else if (Object.prototype.hasOwnProperty.call(channel, 'closing_txid')) {
- return
+ return
}
})
}
diff --git a/app/routes/friends/containers/FriendsContainer.js b/app/routes/friends/containers/FriendsContainer.js
index f5a2bde1..22f304ac 100644
--- a/app/routes/friends/containers/FriendsContainer.js
+++ b/app/routes/friends/containers/FriendsContainer.js
@@ -4,7 +4,10 @@ import { connect } from 'react-redux'
import {
fetchChannels,
openChannel,
+
+ updateChannelSearchQuery,
currentChannels,
+
channelsSelectors
} from 'reducers/channels'
@@ -26,6 +29,7 @@ const mapDispatchToProps = {
closeFriendsForm,
updateFriendFormSearchQuery,
openChannel,
+ updateChannelSearchQuery,
fetchChannels,
fetchPeers,