Skip to content

Conversation

@websurferdoteth
Copy link
Contributor

Closes #7

Sorts locations by their number of active listings, and adds a listing number label to each line item

image

@vercel
Copy link

vercel bot commented Nov 8, 2025

@websurferdoteth is attempting to deploy a commit to the BuidlGuidl Team on Vercel.

A member of the Team first needs to authorize it.

Comment on lines +124 to +133
locations.sort((a: any, b: any) => {
const countA = a.activeListingsCount || 0;
const countB = b.activeListingsCount || 0;
if (countB !== countA) {
return countB - countA;
}
const nameA = (a.name || a.id || "").toLowerCase();
const nameB = (b.name || b.id || "").toLowerCase();
return nameA.localeCompare(nameB);
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sort first by active listing count, then use name as tie-breaker

Copy link
Collaborator

@escottalexander escottalexander left a comment

Choose a reason for hiding this comment

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

This is great!

@escottalexander escottalexander merged commit 9449694 into BuidlGuidl:main Nov 9, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sort locations by number of active listings

2 participants