Skip to content

bug: 'Apply for this mentor' deep link (?id=) is ignored by the mentee registration form #303

Description

@yingliu-data

Bug Report

The "Apply for this mentor" deep link passes ?id=<mentorId>, but the mentee registration wizard never reads it, so the selected mentor is lost.

  • src/components/MentorProfileCard.tsx:131href={/mentorship/mentee-registration?id=${mentor.id}}.
  • src/pages/mentorship/mentee-registration.tsx (whole component, ~lines 92-129) never reads router.query.

Reproduction

A mentee clicks "Apply" on a specific mentor's card → lands on a blank registration wizard with no mentor preselected at the application step → the intent of the deep link is lost.

Severity

Medium

Potential Risk

  • Broken "apply to this mentor" flow; mentees must re-find and re-select the mentor manually (or don't).

Suggested Fix

  • Read router.query.id in the registration page and preselect/prefill the corresponding mentor in the application step.
  • Add a test navigating with ?id=<mentorId> and asserting the mentor is preselected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions