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

Changes: Display text #25

Merged
merged 2 commits into from
Jan 18, 2024
Merged

Changes: Display text #25

merged 2 commits into from
Jan 18, 2024

Conversation

Bahugunajii
Copy link
Member

Description

  • Changed display text
  • Formatted user name

Checklist

  • Self-testing

@Bahugunajii Bahugunajii self-assigned this Jan 18, 2024

const formattedFirstName = names[0].charAt(0).toUpperCase() + names[0].slice(1).toLowerCase();

const formattedLastName = names.length > 1 ? names[1].charAt(0).toUpperCase() + names[1].slice(1).toLowerCase() : '';

Choose a reason for hiding this comment

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

what if names.length > 2? are we sure there will only be one space

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah this works if user has only first_name and last_name and no middle_name. I've updated the code.

Copy link

@suryabulusu suryabulusu left a comment

Choose a reason for hiding this comment

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

left comment

@Bahugunajii Bahugunajii merged commit 746b239 into main Jan 18, 2024
1 check passed
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