Skip to content

feat: disable mentor apply button when registration is closed (#299)#292

Merged
Sowmiya07 merged 1 commit into
Women-Coding-Community:mainfrom
IrynaLypnyk:feat/299-disable-apply-button-when-registration-closed
Jun 27, 2026
Merged

feat: disable mentor apply button when registration is closed (#299)#292
Sowmiya07 merged 1 commit into
Women-Coding-Community:mainfrom
IrynaLypnyk:feat/299-disable-apply-button-when-registration-closed

Conversation

@IrynaLypnyk

@IrynaLypnyk IrynaLypnyk commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Description

Disabled the “Apply for this mentor” action on mentor cards when mentorship registration is closed.

This change:

  • adds disabled state support to the shared LinkButton component;
  • uses the existing IS_REGISTRATION_OPEN flag to control the Apply action on MentorProfileCard;
  • renders the Apply action as a disabled button when registration is closed, instead of an active link.

This prevents users from trying to apply for mentors when registration is not currently available.

Type

  • Bug Fix
  • New Feature
  • Code Refactor
  • Documentation
  • Other

Related Issue

Closes #299

Screenshots

Added screenshots showing the Mentors page with the “Apply for this mentor” button disabled when registration is closed.

BEFORE:
Screenshot 2026-06-26 at 20 04 29

AFTER:
Screenshot 2026-06-26 at 20 02 03

Testing

  • Verified locally with the existing Mentor Filter API.
  • Confirmed that the local database contains a June AD_HOC mentorship cycle and mentors with June availability.
  • Updated the local June AD_HOC cycle status to open for testing.
  • Verified that mentors with availability are returned by /api/cms/v1/mentorship/mentors and displayed on the Mentors page.
  • Verified that the “Apply for this mentor” button is disabled when IS_REGISTRATION_OPEN is false.
  • Verified that the Apply action is rendered as a link when IS_REGISTRATION_OPEN is true.
  • Updated MentorProfileCard component tests to cover both open and closed registration states.

Pull request checklist

Please check if your PR fulfills the following requirements:

  • I checked and followed the contributor guide
  • I have tested my changes locally.
  • I have added a screenshot from the website after I tested it locally

@Sowmiya07 Sowmiya07 merged commit d450936 into Women-Coding-Community:main Jun 27, 2026
3 of 5 checks passed
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants