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

Fixes #104: sort functionality #119

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

silvina-varela
Copy link

@silvina-varela silvina-varela commented Nov 10, 2022

I added a sort functionality that allows sorting A-Z, Z-A, and price low to high/high to low, as well as reset the sorting. Fixes issue #104

Freshbey.1.mp4

@silvina-varela silvina-varela changed the title Fixes #104: sort functionality Fixes roopeshsn/freshbey#104: sort functionality Nov 10, 2022
@silvina-varela silvina-varela changed the title Fixes roopeshsn/freshbey#104: sort functionality Fixes #104: sort functionality Nov 10, 2022
if (type === 'Relevance') return products
switch (type) {
case 'A-Z':
sorter = (a, b) => {
Copy link
Owner

Choose a reason for hiding this comment

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

Could you explain what this sorter function does?

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.

None yet

2 participants