Skip to content

Conversation

@amm98d
Copy link
Contributor

@amm98d amm98d commented Dec 6, 2021

Description

Added a function that implements the Fisher-Yates Shuffling algorithm.

Related Issue

#4657

@amm98d
Copy link
Contributor Author

amm98d commented Dec 7, 2021

Hey @samajammin, updated from random shuffling to sort by country+city. Kindly review.

@amm98d amm98d changed the title Randomise meetup list Sort meetup list Dec 7, 2021
@amm98d amm98d mentioned this pull request Dec 7, 2021
Copy link
Member

@corwintines corwintines left a comment

Choose a reason for hiding this comment

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

Hey @amm98d, thanks for the contribution. At the moment this wont work. You'll need to do the following.

  • import lodash at the top of the file. You could even just import the sortBy method: import { sortBy } from 'lodash'
  • store the sorted list in a variable: const sortedMeetups = sortBy(meetups, ['emoji', 'location'])
  • use the sortedMeetups variable in the render method of this component where we map over the list of meetups. ie: sortedMeetups.map

@amm98d
Copy link
Contributor Author

amm98d commented Dec 8, 2021

Hey @amm98d, thanks for the contribution. At the moment this wont work. You'll need to do the following.

  • import lodash at the top of the file. You could even just import the sortBy method: import { sortBy } from 'lodash'
  • store the sorted list in a variable: const sortedMeetups = sortBy(meetups, ['emoji', 'location'])
  • use the sortedMeetups variable in the render method of this component where we map over the list of meetups. ie: sortedMeetups.map

Understood. I followed the syntax from the documentation, my bad. Pushing changes shortly.

Copy link
Contributor

@minimalsm minimalsm left a comment

Choose a reason for hiding this comment

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

LGTM :-) the deploy preview isn't working right now (unrelated issue) but working fine locally.

Copy link
Member

@corwintines corwintines left a comment

Choose a reason for hiding this comment

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

Awesome, thanks @amm98d!

@github-actions github-actions bot added the content 🖋️ This involves copy additions or edits label Dec 14, 2021
Pre-commit auto-formatting is causing this break
Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Looks good! Just cleared some merge conflicts since this file had been worked on since this PR. Thanks @amm98d ! Don't forget to swing over to Discord and claim your POAP =)

@wackerow wackerow merged commit 68c9e4a into ethereum:dev Dec 14, 2021
@wackerow
Copy link
Member

@all-contributors please add @amm98d for code

@allcontributors
Copy link
Contributor

@wackerow

I've put up a pull request to add @amm98d! 🎉

@wackerow wackerow mentioned this pull request Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content 🖋️ This involves copy additions or edits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants