Skip to content

Commit

Permalink
Merge pull request #13216 from ethereum/meetup-cleanup
Browse files Browse the repository at this point in the history
Meetup list improvements
  • Loading branch information
corwintines authored Jun 24, 2024
2 parents b2dad2e + 12668d8 commit 4d9f0b6
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 63 deletions.
13 changes: 5 additions & 8 deletions src/components/MeetupList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@ export interface Meetup {
const filterMeetups = (query: string): Array<Meetup> => {
if (!query) return sortedMeetups

const lowercaseQuery = query.toLowerCase()

return sortedMeetups.filter((meetup) => {
return (
meetup.title.toLowerCase().includes(lowercaseQuery) ||
meetup.location.toLowerCase().includes(lowercaseQuery)
)
const flag = meetup.emoji.replace(/[:_]/g, " ")
const searchable = [meetup.title, meetup.location, flag].join(" ")
return searchable.toLowerCase().includes(query.toLowerCase())
})
}

Expand Down Expand Up @@ -152,9 +149,9 @@ const MeetupList = () => {
<Box aria-live="assertive" aria-atomic>
{!filteredMeetups.length && (
<InfoBanner emoji=":information_source:">
<Translation id="page-community-meetuplist-no-meetups" />{" "}
<Translation id="page-community:page-community-meetuplist-no-meetups" />{" "}
<InlineLink href="https://github.com/ethereum/ethereum-org-website/blob/dev/src/data/community-meetups.json">
<Translation id="page-community-please-add-to-page" />
<Translation id="page-community:page-community-please-add-to-page" />
</InlineLink>
</InfoBanner>
)}
Expand Down
Loading

0 comments on commit 4d9f0b6

Please sign in to comment.