Skip to content

Commit

Permalink
sorting by symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Mar 3, 2019
1 parent 7324c73 commit e9f445e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/shared/components/Tools/Airgrabs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow
import React, { PureComponent } from 'react';
import { translate } from 'react-i18next';
import { orderBy } from 'lodash';
import { get } from 'dot-prop-immutable';
import {
Button,
Expand Down Expand Up @@ -81,7 +82,8 @@ class ToolsAirgrabs extends PureComponent<Props> {

const airgrabs = get(app, 'constants.airgrabs') || [];

const filteredAirgrabs = airgrabs.filter((airgrab) => {

const filtered = airgrabs.filter((airgrab) => {
const methodWhiteListed = whiteListedMethods.includes(airgrab.method);
const noAttributesBlackListed =
Object.keys(airgrab.methodAttributes).filter(attribute => {
Expand All @@ -98,6 +100,7 @@ class ToolsAirgrabs extends PureComponent<Props> {
return methodWhiteListed && noAttributesBlackListed &&
airgrabStarted && !airgrabEnded && matchesSearchQuery;
});
const filteredAirgrabs = orderBy(filtered, ['symbol']);
return (
<Segment basic>
{claimingAirgrab && (
Expand Down

0 comments on commit e9f445e

Please sign in to comment.