From c642650d4c7b39a6341c5e6de5caee8a124f0dd2 Mon Sep 17 00:00:00 2001 From: George Lima Date: Sat, 9 Feb 2019 02:00:16 -0300 Subject: [PATCH] chore(utils): remove export default from sortBy --- app/containers/dashboard.js | 2 +- app/containers/transactions.js | 2 +- app/utils/sort-by.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/containers/dashboard.js b/app/containers/dashboard.js index 1c0f085..28b88cd 100644 --- a/app/containers/dashboard.js +++ b/app/containers/dashboard.js @@ -14,7 +14,7 @@ import { loadWalletSummarySuccess, loadWalletSummaryError, } 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 { Dispatch } from '../types/redux'; diff --git a/app/containers/transactions.js b/app/containers/transactions.js index e3f2543..d8534a9 100644 --- a/app/containers/transactions.js +++ b/app/containers/transactions.js @@ -16,7 +16,7 @@ import { import rpc from '../../services/api'; 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 { Dispatch } from '../types/redux'; diff --git a/app/utils/sort-by.js b/app/utils/sort-by.js index 425153e..33ab020 100644 --- a/app/utils/sort-by.js +++ b/app/utils/sort-by.js @@ -2,4 +2,4 @@ /* eslint-disable max-len */ // $FlowFixMe -export default (field: string) => (arr: T[]): T[] => arr.sort((a, b) => (a[field] < b[field] ? 1 : -1)); +export const sortBy = (field: string) => (arr: T[]): T[] => arr.sort((a, b) => (a[field] < b[field] ? 1 : -1));