chore(utils): remove export default from sortBy
This commit is contained in:
parent
099a65da79
commit
c642650d4c
|
@ -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';
|
||||||
|
|
|
@ -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';
|
||||||
|
|
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue