-
-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description As described in #178 , a pagination system has been added. Also, line clamp is added to Product Card title. ## Screenshots <!-- PLease add screenshots -->  ## Checklist Please review and check off the following items before submitting your PR: <!-- If yes then add 'x' into '[ ]' --> - [x] I have tested my changes to ensure they work as expected - [x] I have included documentation for any new features or changes - [x] I have formatted my code according to the project's style guidelines - [x] I have written tests for any new features or changes - [x] I have run the project's test suite and verified that all tests pass - [x] I have updated the README and any other relevant documentation - [x] I have checked for any spelling or grammatical errors ## Additional Information In case of tech-labels in Product-Card, usage of line-clamp property shows inappropriate behavior (as shown below) . Therefore, JS is used for maintaining the length of the line. 
- Loading branch information
1 parent
2be76da
commit 7d096d1
Showing
4 changed files
with
135 additions
and
89 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export const paginate = (followers) => { | ||
const itemsPerPage = 9 | ||
const pages = Math.ceil(followers.length / itemsPerPage) | ||
|
||
const newFollowers = Array.from({ length: pages }, (item, index) => { | ||
let start = itemsPerPage * index | ||
return followers.slice(start, start + itemsPerPage) | ||
}) | ||
|
||
return newFollowers | ||
} |
7d096d1
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.
Successfully deployed to the following URLs:
projectshut – ./
projectshut-priyankarpal.vercel.app
projectshut.vercel.app
projectshut-git-main-priyankarpal.vercel.app