Skip to content

Commit

Permalink
Sort name filter
Browse files Browse the repository at this point in the history
  • Loading branch information
tweeres04 committed Jul 31, 2019
1 parent 42d2e1d commit 5742f88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useContext } from 'react';
import { Link } from 'react-router-dom';
import _uniq from 'lodash/fp/uniq';
import _orderBy from 'lodash/orderBy';

import FeaturesContext from './FeaturesContext';

Expand Down Expand Up @@ -54,7 +55,9 @@ export default function App({
],
[],
);
const uniqueNames = _uniq(names);
let uniqueNames = _uniq(names);
uniqueNames = _orderBy(uniqueNames);

const nameOptions = ['All', ...uniqueNames].map(
(n): JSX.Element => (
<option id={n} key={n}>
Expand Down

0 comments on commit 5742f88

Please sign in to comment.