Use immer
This commit is contained in:
parent
7f755d2a83
commit
4f72e164d7
33 changed files with 1236 additions and 1153 deletions
|
@ -1,6 +1,12 @@
|
|||
import React, { Component } from 'react';
|
||||
import { createSelector } from 'reselect';
|
||||
import Navicon from 'containers/Navicon';
|
||||
|
||||
const getSortedDefaultChannels = createSelector(
|
||||
defaults => defaults.channels,
|
||||
channels => channels.concat().sort()
|
||||
);
|
||||
|
||||
export default class Connect extends Component {
|
||||
state = {
|
||||
showOptionals: false,
|
||||
|
@ -90,7 +96,9 @@ export default class Connect extends Component {
|
|||
{defaults.showDetails && (
|
||||
<div className="connect-details">
|
||||
<h2>{defaults.address}</h2>
|
||||
{defaults.channels.sort().map(channel => <p>{channel}</p>)}
|
||||
{getSortedDefaultChannels(defaults).map(channel => (
|
||||
<p>{channel}</p>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<input name="nick" type="text" placeholder="Nick" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue