Skip to content

Conversation

@Srinu346
Copy link
Contributor

Related Tickets & Documents

Fixes: #3435

Description

  • Added "Load More Posts" button functionality to individual post pages (technology/[slug] and community/[slug])
  • Replaced tag-based post fetching with category-based pagination to enable infinite scrolling
  • Ensured consistent behavior between index pages and individual post pages for better user experience

Changes

  • Updated technology/[slug].tsx to use getAllPostsForTechnology instead of getMoreStoriesForSlugs for fetching posts with pagination support
  • Updated community/[slug].tsx to use getAllPostsForCommunity instead of getMoreStoriesForSlugs for fetching posts with pagination support
  • Added initialPageInfo prop to MoreStories component in both slug pages to enable pagination
  • Changed isIndex prop from false to true in community/[slug].tsx to enable load more functionality
  • Implemented filtering to exclude the current post from the "More Stories" section
  • Removed unused getMoreStoriesForSlugs import from both slug pages

Type of Change

  • New feature (change that adds functionality)

Testing

  • Tested "Load More Posts" button functionality on technology post pages
  • Tested "Load More Posts" button functionality on community post pages
  • Verified that the current post is excluded from the "More Stories" section
  • Confirmed pagination works correctly and fetches additional posts when clicking "Load More"
  • Verified that the button appears only when there are more posts to load
  • Tested that the implementation matches the behavior of the index pages (technology/index and community/index)

Screenshot

image image

Environment and Dependencies

  • New Dependencies: None - uses existing API functions and components
  • Configuration Changes: None required

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added corresponding tests
  • I have run the build command to ensure there are no build errors
  • My changes have been tested across relevant browsers/devices
  • For UI changes, I've included visual evidence of my changes

Signed-off-by: Akella Srinivas <alsrinivas.346@gmail.com>
Signed-off-by: Akella Srinivas <alsrinivas.346@gmail.com>
Signed-off-by: Akella Srinivas <alsrinivas.346@gmail.com>
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.

[blog-website]: add loadmore button at the bottom of blog reading pages

1 participant