This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import './assets/emoji-picker.css' | |
| import React, { Component } from 'react' | |
| import { chatsApi, infoApi } from './api' | |
| import AppAside from './AppAside' | |
| import { | |
| preloadDataSuccess as chatsPreloadDataSuccess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const capitalize = string => | |
| `${string.charAt(0).toUpperCase()}${string.slice(1)}` | |
| const withFullState = stateSpec => | |
| compose( | |
| ...Object | |
| .keys(stateSpec) | |
| .map(stateKey => | |
| withState( | |
| stateKey, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const slice = (array, from, to) => { | |
| let realFrom = from < 0 ? array.length + from : from | |
| let realTo = to > array.length ? to - array.length : to | |
| return (realFrom <= realTo | |
| ? array.slice(realFrom, realTo) | |
| : array.slice(realFrom, array.length).concat(array.slice(0, realTo)) | |
| ) | |
| } |
NewerOlder