From 9fbf53d586f2c36a6ff4f1dc52793a95fa8f4fba Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 16 Jan 2017 12:20:22 -0300 Subject: [PATCH] Max Red - Beautify code, replacing another for using .map [skip ci] --- client/src/app-components/stats.js | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/client/src/app-components/stats.js b/client/src/app-components/stats.js index e0b84f42..337bf446 100644 --- a/client/src/app-components/stats.js +++ b/client/src/app-components/stats.js @@ -88,24 +88,12 @@ class Stats extends React.Component { getDropDownProps() { return { - items: [ - { - content: 'Last 7 days', + items: ['Last 7 days', 'Last 30 days', 'Last 90 days', 'Last 365 days'].map((name) => { + return { + content: name, icon: '' - }, - { - content: 'Last 30 days', - icon: '' - }, - { - content: 'Last 90 days', - icon: '' - }, - { - content: 'Last 365 days', - icon: '' - } - ], + }; + }), onChange: this.onDropDownChange.bind(this), className: 'stats__dropdown' }