Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meetup list improvements #13216

Merged
merged 4 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading