Skip to content
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

Update mentee and mentor card #170 #195

Open
wants to merge 35 commits into
base: development
Choose a base branch
from

Conversation

AnsarMahir
Copy link
Contributor

@AnsarMahir AnsarMahir commented Sep 29, 2024

Purpose

The purpose of this PR is to fix #170

Goals

Approach

Changes cannot be done directly to the components inside the Mentee card as these components are being used in different places across the site. The hardcoded values had to changed as they do not support dynamic transitions.

Screenshots

{C5189942-B0F5-4270-AA9D-CEEB3A95B3DD}
{BDE08692-E569-4951-AD5D-5F503EB5DAF6}
{09E67FD9-BA9E-445E-960F-649B30A0D94B}

Checklist

  • This PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.
  • I have read and understood the development best practices guidelines ( http://bit.ly/sef-best-practices )
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Related PRs

Test environment

Learning

@anjula-sack anjula-sack changed the base branch from main to development September 29, 2024 12:35
@AnsarMahir AnsarMahir marked this pull request as ready for review October 20, 2024 11:12
@mayura-andrew
Copy link
Member

@AnsarMahir there are conflictings right? Please resolve

@mayura-andrew
Copy link
Member

@AnsarMahir If you're using SVGs, please move them to the assets/svg folder. You can refer to how other SVGs are handled in the codebase for consistency.

@mayura-andrew
Copy link
Member

@AnsarMahir Can you add screenshot of some example ?

src/assets/svg/BusinessBag.tsx Outdated Show resolved Hide resolved
src/pages/MentorProfile/MentorProfile.component.tsx Outdated Show resolved Hide resolved
src/components/MentorCard/MentorCard.component.tsx Outdated Show resolved Hide resolved
src/components/MenteeCard/index.tsx Outdated Show resolved Hide resolved
@AnsarMahir
Copy link
Contributor Author

@anjula-sack did the requested changes

? Math.max(0, mentor.application.noOfMentees - approvedMenteesCount)
: 0;

const totalApplications = mentor?.mentees?.length ?? 0;
Copy link
Member

Choose a reason for hiding this comment

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

Total application count is also there in the mentor application.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This issue is that , I tried already to simplify the logic as below

const appliedMenteesCount = mentor?.application?.appliedMenteesCount ?? 0;
  const availableMenteeSlots = mentor?.application?.availableMenteeSlots ?? 0;

but it pop up an error,
"Property 'appliedMenteesCount' does not exist on type '{ firstName: string; lastName: string; email: string; contactNo: string; country: string; position: string; expertise: string; bio: string; isPastMentor: boolean; reasonToMentor: string; profilePic: string; ... 10 more ...; canCommit?: boolean | undefined; }'."

Tried to fix that error by adding

 appliedMenteesCount?: number; 
  availableMenteeSlots?: number;

to the mentor interface, but did not work out. :(. That's why just left it as it is

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.

Update mentor and mentee card component UI
3 participants