Closed Jansen52x closed 1 week ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
afterclass-io-v2 | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 1, 2024 5:30pm |
closes #144
Context
Previously, there's no way for users to load more reviews than what is initially loaded. This change adds the functionality through a see more button.
Changes
1) See more button added which loads an additional 10 reviews after initial 10
2) New component (LoadMoreReviews) added to handle additional reviews
3) Misc: Changed reviews.json to have identifiable text to distinguish between reviews
Implementation Details
1) Page.tsx will call both the initial set of reviewItems as well as LoadMoreReviews component. 2) Clicking the see more button each time will add the next 10 reviews to the list of reviews in the LoadMoreReviews component, separate from the initial 10 reviews. 3) useRef used such that the page isn't reloaded upon the see more button click
How to Test
On the main page, can scroll to the button and click See More, you will see 10 more reviews loaded
Checklist