Description
Add a Resources section (recommended books and resource links) to both the Create Mentor and Edit Mentor pages in the admin app.
How it should work:
- The Edit Mentor form already has a
ResourcesSection component with books (multiline text) and links (title + URL pairs) fields, and the schema/payload are fully wired — but the section was hidden pending the Create form being aligned.
- The Create Mentor form has no resources support: the schema, default values, and
transformFormData are all missing books and links.
Requirements:
- Re-enable
ResourcesSection in EditMentorForm.tsx.
- Add
books and links fields to CreateMentor/schema.ts (both optional).
- Add
books and links to defaultValues in CreateMentorForm.tsx.
- Include
resources: { books, links } in transformFormData of
CreateMentorForm.tsx.
- Reuse the existing
ResourcesSection component from EditMentor/ in the
Create form.
Edge cases:
- Both fields are optional — no validation error when left blank.
Expected behavior
When an admin opens either the Create or Edit Mentor page, a "Resources" section
is visible below the Mentorship Availability section. The admin can enter
recommended books and add/remove resource links (title + URL).
On save/submit, the payload sent to the backend includes:
"resources": {
"books": ["Clean Code", "The Pragmatic Programmer"],
"links": [{ "title": "MDN Docs", "uri": "https://developer.mozilla.org" }]
}
Additional Context
The backend Mentor domain already supports resources.books and resources.links — no backend changes needed.
Description
Add a Resources section (recommended books and resource links) to both the Create Mentor and Edit Mentor pages in the admin app.
How it should work:
ResourcesSectioncomponent withbooks(multiline text) andlinks(title + URL pairs) fields, and the schema/payload are fully wired — but the section was hidden pending the Create form being aligned.transformFormDataare all missingbooksandlinks.Requirements:
ResourcesSectioninEditMentorForm.tsx.booksandlinksfields toCreateMentor/schema.ts(both optional).booksandlinkstodefaultValuesinCreateMentorForm.tsx.resources: { books, links }intransformFormDataofCreateMentorForm.tsx.ResourcesSectioncomponent fromEditMentor/in theCreate form.
Edge cases:
Expected behavior
When an admin opens either the Create or Edit Mentor page, a "Resources" section
is visible below the Mentorship Availability section. The admin can enter
recommended books and add/remove resource links (title + URL).
On save/submit, the payload sent to the backend includes:
Additional Context
The backend Mentor domain already supports resources.books and resources.links — no backend changes needed.