Skip to content

Conversation

@jeromehardaway
Copy link
Contributor

This pull request introduces a new TextBlock component, refactors the Mentor Form to support both mentors and mentees, and updates content for the "Become a Mentor" page. The most significant changes include the addition of the reusable TextBlock component, the unification of mentor and mentee registration into a single form, and updated messaging and structure for mentorship-related content.

Component Enhancements:

  • New TextBlock Component: Added a reusable TextBlock component with customizable properties such as text size, spacing, and optional highlighting. This component dynamically generates classes and supports headings and multiple paragraphs. (src/components/common/text-block.tsx)

Form Refactoring:

  • Unified Mentor and Mentee Form: Refactored the MentorForm into MentorMenteeForm to support both mentor and mentee registration. Added role-specific fields and a toggle to switch between roles. Updated form submission to handle role-specific endpoints and data. (src/components/forms/mentor-form.tsx) [1] [2] [3] [4] [5]

Content Updates:

  • "Become a Mentor" Page Updates: Revised the content for the "Become a Mentor" page to better reflect the mentorship program's goals. Updated section titles, subtitles, and descriptions to emphasize inclusivity and the benefits of mentorship for both mentors and mentees. (src/data/innerpages/become-a-mentor.json) [1] [2]

Minor Adjustments:

  • Code Style Improvements: Adjusted class order and formatting in the GradationArea component for better readability and consistency. (src/containers/gradation/index.tsx) [1] [2]

@jeromehardaway jeromehardaway requested a review from Copilot May 3, 2025 16:52
@jeromehardaway jeromehardaway self-assigned this May 3, 2025
@vercel
Copy link
Contributor

vercel bot commented May 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vets-who-code-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 3, 2025 4:52pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the mentor program by introducing a new reusable TextBlock component, refactoring the mentor registration form into a unified mentor/mentee form, and revising the content on the "Become a Mentor" page.

  • Added the TextBlock component to display mentorship messaging on the mentor page.
  • Refactored MentorForm into MentorMenteeForm to support both mentor and mentee registrations with role-specific fields.
  • Introduced a new API endpoint for mentee submissions and made minor layout adjustments in the GradationArea.

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/pages/mentor.tsx Updated page layout with TextBlock, GradationArea, and adjusted spacer elements
src/pages/api/mentee.ts Added new endpoint for mentee submissions using similar validation and Slack webhook
src/containers/gradation/index.tsx Modified class ordering for better readability and adjusted count display formatting
src/components/forms/mentor-form.tsx Refactored form for dual role registration with role switching and additional fields
src/components/common/text-block.tsx Introduced a reusable TextBlock component with customizable styling
Files not reviewed (1)
  • src/data/innerpages/become-a-mentor.json: Language not supported

const handleRoleChange = (newRole: "mentor" | "mentee") => {
setRole(newRole);
// Clear form when switching roles
reset();
Copy link

Copilot AI May 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reset function is invoked in handleRoleChange but is not destructured from the useForm hook. Please ensure to extract reset (e.g., const { register, handleSubmit, reset, errors } = useForm();) to avoid runtime errors.

Copilot uses AI. Check for mistakes.
<mark className="tw-absolute tw-bg-transparent tw-top-1/2 tw-right-0 -tw-translate-y-1/2 tw-text-[120px] tw-leading-[0.8] tw-font-black tw-text-gray-550 -tw-z-1 tw-p-5">
{items?.length.toString().padStart(2, "0") || "00"}
<mark className="tw-absolute tw-right-0 tw-top-1/2 -tw-z-1 -tw-translate-y-1/2 tw-bg-transparent tw-p-5 tw-text-[120px] tw-font-black tw-leading-[0.8] tw-text-gray-550">
{items?.length.toString() || "0"}
Copy link

Copilot AI May 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The previous version used padStart to ensure a two-digit display for the item count. If two-digit formatting is required, consider reverting to or adapting the padStart approach.

Suggested change
{items?.length.toString() || "0"}
{(items?.length?.toString().padStart(2, "0")) || "00"}

Copilot uses AI. Check for mistakes.
@jeromehardaway jeromehardaway merged commit 21f1015 into master May 3, 2025
3 checks passed
@jeromehardaway jeromehardaway deleted the UpdateMentorProgram branch May 3, 2025 16:56
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