Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Fixes #104: sort functionality#119

Open
silvina-varela wants to merge 3 commits intoroopeshsn:masterfrom
silvina-varela:sorter-menu
Open

Fixes #104: sort functionality#119
silvina-varela wants to merge 3 commits intoroopeshsn:masterfrom
silvina-varela:sorter-menu

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants