Skip to content

[Fix] Make blog list cards clickable#214

Open
rahulrr-coder wants to merge 2 commits intovailabel:mainfrom
rahulrr-coder:fix/clickable-blog-cards
Open

[Fix] Make blog list cards clickable#214
rahulrr-coder wants to merge 2 commits intovailabel:mainfrom
rahulrr-coder:fix/clickable-blog-cards

Conversation

@rahulrr-coder
Copy link

Fix #213

This pull request refactors the blog listing and detail pages to improve code readability and streamline navigation. The main changes include simplifying function parameter destructuring, updating link structure for blog cards, and minor improvements to pagination logic.

Code readability and consistency:

  • Refactored the generateMetadata and BlogDetailPage functions in apps/web/app/blogs/[slug]/page.tsx to use direct destructuring of the params object in the function signature, reducing boilerplate and improving clarity. (apps/web/app/blogs/[slug]/page.tsxL8-R8, apps/web/app/blogs/[slug]/page.tsxL44-R39)
  • Improved the pagination logic in apps/web/app/blogs/page.tsx by replacing || with the nullish coalescing operator ?? for safer default value handling.

Navigation and UI improvements:

  • Wrapped each blog card in a single Link component to ensure the entire card is clickable, enhancing the user experience and accessibility. [1] [2]
  • Changed the "Read More" button from a nested Link to a styled div inside the clickable card, preventing nested interactive elements and aligning with best practices.

@vercel
Copy link

vercel bot commented Oct 20, 2025

@rahulrr-coder is attempting to deploy a commit to the vailabel Team on Vercel.

A member of the Team first needs to authorize it.

@rahulrr-coder
Copy link
Author

The changes are done and the PR is ready to merge.

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.

Bug : Blog cards and titles not clickable

1 participant