-
Notifications
You must be signed in to change notification settings - Fork 44
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
Kaleem neslit.9859.profile loading #9861
base: master
Are you sure you want to change the base?
Conversation
const { data: userCommunity } = useGetCommunityByIdQuery({ | ||
id: userCommunityId || '', | ||
enabled: !!userCommunityId, | ||
}); | ||
|
||
if (showSkeleton || isLoadingUserCommunity) { | ||
if (showSkeleton) { |
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.
this would break in many cases. If userCommunityId
is undefined
or ''
, then the component passing that prop to this component, isn't passing the prop correctly. Lets fix it there.
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.
this would break in many cases. If
userCommunityId
isundefined
or''
, then the component passing that prop to this component, isn't passing the prop correctly. Lets fix it there.
@mzparacha issue is that for me locally is working fine not able to reproduce the bug .even i have latest dump
@timolegros Kaleem is unable to replicate this bug locally, but thinks this may be the fix for it. If you're able to see it locally would you take a look at this code and see if it fixes it when you get a minute? I was unable to replicate it locally as well. |
I was able to test but only by adding This did not fix the issue: |
@Israellund @timolegros i tried to reproduce this today as well not bale to create in local and production is also working fine |
@timolegros i tried the steps you added above but still not able to reproduce it . can you please share the reproduction Video with console logs . |
Link to Issue
Closes: #9859
Description of Changes
I was unable to reproduce the bug on my local machine. The issue appears when passing id: userCommunityId || ''.
In cases where the ID is an empty string (""), isLoadingUserCommunity always remains true
suggested solution and Implemented solution
if (showSkeleton || isLoadingUserCommunity) { return ( <UserSkeleton shouldShowAvatarOnly={shouldShowAvatarOnly} shouldHideAvatar={shouldHideAvatar} shouldShowPopover={shouldShowPopover} avatarSize={avatarSize} /> ); }
after removing isLoadingUserCommunity i am hopeful it will work fine in production .
Additional Notes:
The showSkeleton state was undefined because it wasn't being passed from the parent component. I have fixed this by ensuring that showSkeleton is passed down correctly, or its logic is adjusted to meet the requirements.