Bug Report
MentorProfileCard tab indices break when optional tabs are conditionally rendered, making a panel show the wrong content or become unreachable.
src/components/MentorProfileCard.tsx:166-171 — the Reviews and Resources <Tab>s are conditional, but the panels use hardcoded indices: TabPanel index={2} (Reviews, line ~275) and index={3} (Resources, line ~314).
Reproduction
A mentor has resources but no feedbackSection → MUI assigns the Resources tab value 2 → clicking it shows the (empty) Reviews panel at index 2, and the Resources panel at index 3 is unreachable.
Severity
Medium
Potential Risk
- Mentor resources/reviews are shown under the wrong tab or hidden entirely.
Suggested Fix
- Compute tab values dynamically (assign indices based on which tabs are actually rendered) instead of hardcoding 2/3, so tab and panel indices always agree.
- Add a test for a mentor with resources but no reviews (assert the Resources panel is reachable and correct).
Bug Report
MentorProfileCardtab indices break when optional tabs are conditionally rendered, making a panel show the wrong content or become unreachable.src/components/MentorProfileCard.tsx:166-171— the Reviews and Resources<Tab>s are conditional, but the panels use hardcoded indices:TabPanel index={2}(Reviews, line ~275) andindex={3}(Resources, line ~314).Reproduction
A mentor has
resourcesbut nofeedbackSection→ MUI assigns the Resources tab value 2 → clicking it shows the (empty) Reviews panel at index 2, and the Resources panel at index 3 is unreachable.Severity
Medium
Potential Risk
Suggested Fix