-
-
Notifications
You must be signed in to change notification settings - Fork 71
Update mentor program #703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ontent for mentor sections
…mentor form to handle mentee role
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this 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(); |
Copilot
AI
May 3, 2025
There was a problem hiding this comment.
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.
| <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"} |
Copilot
AI
May 3, 2025
There was a problem hiding this comment.
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.
| {items?.length.toString() || "0"} | |
| {(items?.length?.toString().padStart(2, "0")) || "00"} |
This pull request introduces a new
TextBlockcomponent, 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 reusableTextBlockcomponent, the unification of mentor and mentee registration into a single form, and updated messaging and structure for mentorship-related content.Component Enhancements:
TextBlockComponent: Added a reusableTextBlockcomponent 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:
MentorFormintoMentorMenteeFormto 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:
src/data/innerpages/become-a-mentor.json) [1] [2]Minor Adjustments:
GradationAreacomponent for better readability and consistency. (src/containers/gradation/index.tsx) [1] [2]