-
Notifications
You must be signed in to change notification settings - Fork 46
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Hrishikesh Agarwal <[email protected]>
src/components/UserProfile.jsx
Outdated
@@ -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' |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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]>
@codetheorem there are some conflicts. can you rebase once? |
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
Provide a Deployed link of route/page that needs to review
Preview: Deploy preview link here with the appropriate route