-
Notifications
You must be signed in to change notification settings - Fork 57
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
added sort functionality to search and category page #106
Conversation
Hi, @kanavmittal Could you show the functionality through a screen recorded video? |
How it will look on mobile screens? |
@roopeshsn sure |
RPReplay_Final1666021470.MP4@roopeshsn for mobile view |
Screen.Recording.2022-10-17.at.9.18.34.PM.mov@roopeshsn for desktop view |
@roopeshsn anything needed? |
Yeah |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly do the changes.
@@ -5,6 +5,7 @@ const Product = require('../models/productModel') | |||
// @route GET /api/products | |||
// @access Public | |||
const getProducts = asyncHandler(async (req, res) => { | |||
var sort_type, products |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're using camelCase so, change all occurrences to camelCase. If it is a constant (sort_type) use this naming convention CONSTANT_NAME
Also, don't use var, use const or let. Format the code using the prettier command. Check the package.json file.
Hey, @kanavmittal Are you not interested to get this PR merged? |
@roopeshsn
This commit resolves #104