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

removed null values from profile #121

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

codetheorem
Copy link
Member

@codetheorem codetheorem commented Feb 4, 2022

Signed-off-by: Hrishikesh Agarwal [email protected]

Issue Number

fixes #99

Describe the changes you've made
I have edited the userprofile component to remove the null values from profile.

Describe if there is any unusual behavior (Any Warning) of your code(Write NA if there isn't)

NA

http://localhost:3000/profile/5fb67859b20c0c001799eac2 you can visit this url.

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • The title of my pull request is a short description of the requested changes.

Provide a Deployed link of route/page that needs to review

Preview: Deploy preview link here with the appropriate route

Signed-off-by: Hrishikesh Agarwal <[email protected]>
@@ -109,7 +109,11 @@ export const UserDetails = ({
placeholder='Your name'
>
<h2 className='user-profile-name'>
{user.Name ? user.Name : user.username}
{user.Name
? user.Name === 'null'
Copy link
Member

Choose a reason for hiding this comment

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

why do we have null as string? @SundeepChand do you have any idea?

Copy link
Member

Choose a reason for hiding this comment

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

also, looks like this == 'null' comparison is being used in multiple places, let's make a function for it and use it everywhere

Signed-off-by: Hrishikesh Agarwal <[email protected]>
@@ -92,6 +92,10 @@ export const UserDetails = ({
allowEditing,
updateProfile
}) => {
const checkNull = (value) => {
Copy link
Member

Choose a reason for hiding this comment

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

@codetheorem i think you were earlier checking for ? user.Name === 'null'
if the values are null and not string 'null' we dont need a separate function.

Signed-off-by: Hrishikesh Agarwal <[email protected]>
@kaybhutani
Copy link
Member

kaybhutani commented Feb 18, 2022

@codetheorem there are some conflicts. can you rebase once?

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.

Hide null values in profile
2 participants