Skip to content

Commit

Permalink
fix avatarSrc in AccountIcon type check
Browse files Browse the repository at this point in the history
  • Loading branch information
luiqor committed Nov 23, 2024
1 parent f809939 commit b728ed6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/containers/navigation-icons/AccountIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ const AccountIcon: FC<AccountIconProps> = ({ openMenu }) => {
const { photo: statePhoto } = useAppSelector((state) => state.editProfile)

const avatarSrc = useMemo(() => {
if (statePhoto?.src) {
if (typeof statePhoto === 'object' && statePhoto?.src) {
return statePhoto.src
}

if (photo) {
if (photo || photo === '') {
return createUrlPath(import.meta.env.VITE_APP_IMG_USER_URL || '', photo)
}
}, [photo, statePhoto])
Expand Down

0 comments on commit b728ed6

Please sign in to comment.