Skip to content

Commit

Permalink
catch invalid avatar data
Browse files Browse the repository at this point in the history
  • Loading branch information
NickJ202 committed Jun 18, 2024
1 parent 65da07b commit e3d8400
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/atoms/Notification/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ export const Wrapper = styled.div`
align-items: center;
padding: 11.5px 17.5px;
background: ${(props) => props.theme.colors.container.alt3.background};
border: 1px solid ${(props) => props.theme.colors.border.primary};
border-radius: ${STYLING.dimensions.radius.primary};
`;

export const Message = styled.span`
color: ${(props) => props.theme.colors.font.alt2};
color: ${(props) => props.theme.colors.font.primary};
font-weight: ${(props) => props.theme.typography.weight.bold};
font-size: ${(props) => props.theme.typography.size.xSmall};
`;
Expand Down
3 changes: 2 additions & 1 deletion src/views/Landing/Profile/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ export default function Profile(props: { address: string }) {
}, [props.address, arProvider.profile]);

function getAvatar() {
if (fullProfile && fullProfile.avatar) return <img src={getTxEndpoint(fullProfile.avatar)} />;
if (fullProfile && fullProfile.avatar && checkAddress(fullProfile.avatar))
return <img src={getTxEndpoint(fullProfile.avatar)} />;
return <ReactSVG src={ASSETS.user} />;
}

Expand Down

0 comments on commit e3d8400

Please sign in to comment.