From 8faf9be330929b1d50345023c082628af2456b75 Mon Sep 17 00:00:00 2001 From: Chris Potter Date: Fri, 21 Jun 2019 09:50:19 -0400 Subject: [PATCH 1/3] Sorts Currencies by name alphabetically Signed-off-by: Chris Potter --- .../core/i18n/client/components/localizationSettings.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/imports/plugins/core/i18n/client/components/localizationSettings.js b/imports/plugins/core/i18n/client/components/localizationSettings.js index 56bd05673d3..34d28d33d3b 100644 --- a/imports/plugins/core/i18n/client/components/localizationSettings.js +++ b/imports/plugins/core/i18n/client/components/localizationSettings.js @@ -72,7 +72,10 @@ class LocalizationSettings extends Component { } renderCurrencies() { - return this.props.currencies.map((currency, key) => ( + console.log(this.props.currencies); + return this.props.currencies.sort( + (a, b) => a.name.localeCompare(b.name) + ).map((currency, key) => ( Date: Fri, 21 Jun 2019 10:18:42 -0400 Subject: [PATCH 2/3] Remove console.log Signed-off-by: Chris Potter --- .../core/i18n/client/components/localizationSettings.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/imports/plugins/core/i18n/client/components/localizationSettings.js b/imports/plugins/core/i18n/client/components/localizationSettings.js index 34d28d33d3b..d9027e331b1 100644 --- a/imports/plugins/core/i18n/client/components/localizationSettings.js +++ b/imports/plugins/core/i18n/client/components/localizationSettings.js @@ -72,10 +72,7 @@ class LocalizationSettings extends Component { } renderCurrencies() { - console.log(this.props.currencies); - return this.props.currencies.sort( - (a, b) => a.name.localeCompare(b.name) - ).map((currency, key) => ( + return this.props.currencies.sort((a, b) => a.name.localeCompare(b.name)).map((currency, key) => ( Date: Fri, 21 Jun 2019 13:47:33 -0400 Subject: [PATCH 3/3] Updates to long variable names Signed-off-by: Chris Potter --- .../plugins/core/i18n/client/components/localizationSettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imports/plugins/core/i18n/client/components/localizationSettings.js b/imports/plugins/core/i18n/client/components/localizationSettings.js index d9027e331b1..169e8fc8715 100644 --- a/imports/plugins/core/i18n/client/components/localizationSettings.js +++ b/imports/plugins/core/i18n/client/components/localizationSettings.js @@ -72,7 +72,7 @@ class LocalizationSettings extends Component { } renderCurrencies() { - return this.props.currencies.sort((a, b) => a.name.localeCompare(b.name)).map((currency, key) => ( + return this.props.currencies.sort((currencyA, currencyB) => currencyA.name.localeCompare(currencyB.name)).map((currency, key) => (