Skip to content

Commit

Permalink
Fix species sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluesmile82 committed Jul 12, 2022
1 parent 210aa7f commit 3e11441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/containers/sidebars/aoi-sidebar/species-card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const SpeciesCardContainer = (props) => {
}, [speciesData.species])

useEffect(() => {
const sortSpecies = (s) => orderBy(s, ['has_image', 'globaldRangeArea', 'conservationConcern'], ['desc', 'desc', 'desc']);
const sortSpecies = (s) => orderBy(s, ['has_image', 'presenceInArea', 'conservationConcern'], ['desc', 'desc', 'desc']);
const speciesSorted = speciesData.species && sortSpecies(
(selectedSpeciesFilter.slug === 'all') ?
[...speciesData.species] :
Expand Down

1 comment on commit 3e11441

@vercel
Copy link

@vercel vercel bot commented on 3e11441 Jul 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.