Migrate util, types, state, sticker-creator to ESLint
This commit is contained in:
parent
372aa44e49
commit
2ade4acd52
115 changed files with 647 additions and 448 deletions
|
@ -1,6 +1,6 @@
|
|||
import { isNumber } from 'lodash';
|
||||
import { connect } from 'react-redux';
|
||||
import { mapDispatchToProps } from '../actions';
|
||||
import { isNumber } from 'lodash';
|
||||
|
||||
import {
|
||||
STATE_ENUM,
|
||||
|
@ -26,11 +26,16 @@ const mapStateToProps = (state: StateType, props: ExternalProps) => {
|
|||
|
||||
const { isLoadingMessages, loadCountdownStart } = conversation;
|
||||
|
||||
const loadingState: STATE_ENUM = isLoadingMessages
|
||||
? 'loading'
|
||||
: isNumber(loadCountdownStart)
|
||||
? 'countdown'
|
||||
: 'idle';
|
||||
let loadingState: STATE_ENUM;
|
||||
|
||||
if (isLoadingMessages) {
|
||||
loadingState = 'loading';
|
||||
} else if (isNumber(loadCountdownStart)) {
|
||||
loadingState = 'countdown';
|
||||
} else {
|
||||
loadingState = 'idle';
|
||||
}
|
||||
|
||||
const duration = loadingState === 'countdown' ? LOAD_COUNTDOWN : undefined;
|
||||
const expiresAt =
|
||||
loadingState === 'countdown' && loadCountdownStart
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue