Skip to content

feat(ui): make instructor cards fully clickable and add scroll-to-top component#25

Open
nitishchaubeyy wants to merge 2 commits into
Mehren7:mainfrom
nitishchaubeyy:feat/clickable-instructor-cards
Open

feat(ui): make instructor cards fully clickable and add scroll-to-top component#25
nitishchaubeyy wants to merge 2 commits into
Mehren7:mainfrom
nitishchaubeyy:feat/clickable-instructor-cards

Conversation

@nitishchaubeyy

Copy link
Copy Markdown
Contributor

This PR enhances the InstructorCard component to make the entire card surface clickable, significantly improving the touch target area for mobile users and the overall navigation UX. Additionally, it resolves a missing module error that was crashing the development server by introducing a clean, theme-aligned ScrollToTop component.

Related Issue 🔗

Closes #24

Changes Made 🛠️

  • Interactive Instructor Cards: Utilized the CSS pseudo-element overlay pattern (after:absolute after:inset-0) on the Next.js <Link> component. This expands the clickable area over the entire card without causing invalid HTML nesting (like wrapping <a> tags inside <a> tags).
  • Z-Index Layering: Applied relative z-10 to the price badge and specialty tags within the card to ensure they remain cleanly layered and text remains selectable.
  • Scroll To Top Component: Created a missing ScrollToTop.tsx component in the components/ directory. It features a minimalist design matching the platform's violet theme and appears smoothly after scrolling 300px.

Testing ✅

  • Verified that clicking anywhere on the instructor card correctly routes to the respective instructor's profile.
  • Verified the ScrollToTop button appears on scroll and smoothly returns the user to the top of the page.
  • Ensured the local development server runs cleanly without any Module not found errors.

@vercel

vercel Bot commented Apr 27, 2026

Copy link
Copy Markdown

@nitishchaubeyy is attempting to deploy a commit to the Mehren's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented May 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
parampara Error Error May 6, 2026 6:02pm

@Mehren7 Mehren7 added enhancement New feature or request NSoC'26 NSoc'26 program tracking Level2 INTERMEDITE LEVEL labels May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Level2 INTERMEDITE LEVEL NSoC'26 NSoc'26 program tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UX/UI Make Instructor Cards fully clickable

2 participants