mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-09 23:40:05 +00:00
* Fixed issue with profile picture showing fallback image in navbar even with profile image is present in user details * Added additional check for displaying profile picture in user details page * Worked on comments
This commit is contained in:
parent
2c609b4ea4
commit
1d0c6360bf
@ -784,6 +784,12 @@ const Users = ({
|
||||
prepareSelectedTeams();
|
||||
}, [userData]);
|
||||
|
||||
useEffect(() => {
|
||||
if (image) {
|
||||
SetIsImgUrlValid(true);
|
||||
}
|
||||
}, [image]);
|
||||
|
||||
const getEntityData = useCallback(
|
||||
(entityData: EntityReference[], tabNumber: number) => {
|
||||
const updatedEntityData = filterEntityAssets(entityData || []);
|
||||
|
||||
@ -64,6 +64,11 @@ const NavBar = ({
|
||||
handleKeyDown,
|
||||
handleOnClick,
|
||||
}: NavBarProps) => {
|
||||
// get current user details
|
||||
const currentUser = useMemo(
|
||||
() => AppState.getCurrentUserDetails(),
|
||||
[AppState.userDetails, AppState.nonSecureUserDetails]
|
||||
);
|
||||
const history = useHistory();
|
||||
const [searchIcon, setSearchIcon] = useState<string>('icon-searchv1');
|
||||
const [suggestionSearch, setSuggestionSearch] = useState<string>('');
|
||||
@ -75,8 +80,8 @@ const NavBar = ({
|
||||
const [isImgUrlValid, SetIsImgUrlValid] = useState<boolean>(true);
|
||||
|
||||
const profilePicture = useMemo(
|
||||
() => AppState?.userDetails?.profile?.images?.image512,
|
||||
[AppState]
|
||||
() => currentUser?.profile?.images?.image512,
|
||||
[currentUser]
|
||||
);
|
||||
|
||||
const { socket } = useWebSocketConnector();
|
||||
@ -212,6 +217,12 @@ const NavBar = ({
|
||||
};
|
||||
}, [socket]);
|
||||
|
||||
useEffect(() => {
|
||||
if (profilePicture) {
|
||||
SetIsImgUrlValid(true);
|
||||
}
|
||||
}, [profilePicture]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="tw-h-16 tw-py-3 tw-border-b-2 tw-border-separator">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user