chore(utils): remove export default from sortBy

This commit is contained in:
George Lima 2019-02-09 02:00:16 -03:00
parent 099a65da79
commit c642650d4c
3 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ import {
loadWalletSummarySuccess, loadWalletSummarySuccess,
loadWalletSummaryError, loadWalletSummaryError,
} from '../redux/modules/wallet'; } from '../redux/modules/wallet';
import sortBy from '../utils/sort-by'; import { sortBy } from '../utils/sort-by';
import type { AppState } from '../types/app-state'; import type { AppState } from '../types/app-state';
import type { Dispatch } from '../types/redux'; import type { Dispatch } from '../types/redux';

View File

@ -16,7 +16,7 @@ import {
import rpc from '../../services/api'; import rpc from '../../services/api';
import store from '../../config/electron-store'; import store from '../../config/electron-store';
import sortBy from '../utils/sort-by'; import { sortBy } from '../utils/sort-by';
import type { AppState } from '../types/app-state'; import type { AppState } from '../types/app-state';
import type { Dispatch } from '../types/redux'; import type { Dispatch } from '../types/redux';

View File

@ -2,4 +2,4 @@
/* eslint-disable max-len */ /* eslint-disable max-len */
// $FlowFixMe // $FlowFixMe
export default <T>(field: string) => (arr: T[]): T[] => arr.sort((a, b) => (a[field] < b[field] ? 1 : -1)); export const sortBy = <T>(field: string) => (arr: T[]): T[] => arr.sort((a, b) => (a[field] < b[field] ? 1 : -1));