Skip to content
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

[Feat] Implement Dynamic Loading of Blog Pages Based on Blog Card Selection #916

Open
5 tasks done
kavya410004 opened this issue Oct 23, 2024 · 7 comments
Open
5 tasks done

Comments

@kavya410004
Copy link
Contributor

Description

Currently, there are two types of blog-related pages:

  • Blog Grid Page: Displays blog posts in a grid format, with each post represented as a card.
  • Blog Page: Displays the full content of a particular blog.

The Blog Grid page is displaying the cards correctly, but when clicking the "Read More" button on any blog card, it does not load the corresponding blog's full content. Instead, the same static blog page is displayed, regardless of which card is selected.

Proposed Solution:

  • Use an array of objects to store the blog data, where each object represents a blog with its title, images, content, comments etc.
  • Update the logic to make the Blog Page load dynamically based on the selected blog card.
  • When the "Read More" button of a blog card is clicked, the Blog Page should display the content of the corresponding blog by accessing the data from the array.
  • Ensure that each blog's unique information is passed correctly from the Blog Grid page to the Blog Page, allowing it to render the correct content dynamically.

Expected Outcome:

  • Each blog card should redirect to a blog page that displays the full content of the selected blog post.
  • The blog's title, images, and content should be loaded dynamically based on the card selection, using data from the array of objects.

Additional Information:

  • This solution will not require a database, as all blog data will be fetched from an array of objects.
  • The functionality might involve passing a unique identifier or index of the selected blog from the Blog Grid page to the Blog Page.
  • This will simplify the implementation while enabling dynamic rendering of blog content based on user selection.

Screenshots

Blog Grid Page:
image

Same blog page displayed for every blog card:
image

Checklist

  • I have checked the existing issues
  • I have read the Contributing Guidelines
  • I'm a GSSoC'24-Extd contributor
  • I'm a Hacktoberfest'24 contributor
  • I am willing to work on this issue (optional)
@kavya410004 kavya410004 added the enhancement New feature or request label Oct 23, 2024
Copy link

Hello kavya410004! Thanks for opening an issue in Ezyshop! 🚀

  • We'll get back to you as soon as possible.

  • Hope you star our Repo.

  • Join our Discord Server to collaborate and discuss further.

@mdazfar2
Copy link
Owner

@kavya410004 Issue acknowledged! You are going to be assigned.

@ShivanshPlays
Copy link
Contributor

@kavya410004 I have a request, kindly make the components of detailed blog page reusable and dynamic so the they can be used with backend fetched data in the future.

@mdazfar2
Copy link
Owner

Hey @kavya410004, can you do that? You need to fetch the blog details from the database, as the database is working fine on the Vercel deployment. It would be great if you could handle fetching the data from the database. Thank you!

@kavya410004
Copy link
Contributor Author

@kavya410004 I have a request, kindly make the components of detailed blog page reusable and dynamic so the they can be used with backend fetched data in the future.

Sure

@kavya410004
Copy link
Contributor Author

Hey @kavya410004, can you do that? You need to fetch the blog details from the database, as the database is working fine on the Vercel deployment. It would be great if you could handle fetching the data from the database. Thank you!

Yes, for that I need to create a schema for blog in the database and add entries to it. Shall I raise a new issue to implement that and fetch the details to blog grid?

@mdazfar2
Copy link
Owner

Sure @kavya410004.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants