diff options
-rw-r--r-- | vnext/src/components/Avatar.js | 4 | ||||
-rw-r--r-- | vnext/src/components/__tests__/Avatar.test.js | 2 | ||||
-rw-r--r-- | vnext/src/components/__tests__/__snapshots__/Avatar.test.js.snap | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/vnext/src/components/Avatar.js b/vnext/src/components/Avatar.js index c42a048a..dfa197c1 100644 --- a/vnext/src/components/Avatar.js +++ b/vnext/src/components/Avatar.js @@ -9,7 +9,7 @@ const Avatar = React.memo(props => { <div style={{ display: 'flex' }}> <div className="msg-avatar"> <Link to={{ pathname: props.link || `/${props.user.uname}/` }}> - <img src={`//i.juick.com/a/${props.user.uid}.png`} alt={`${props.user.uname}`} /> + <img src={props.user.avatar} alt={`${props.user.uname}`} /> </Link> </div> <div style={{ display: 'flex', flexDirection: 'column' }}> @@ -29,7 +29,7 @@ export default Avatar; export const AvatarLink = React.memo(props => { return ( <Link to={{ pathname: props.link || `/${props.user.uname}/` }}> - <img src={`//i.juick.com/a/${props.user.uid}.png`} alt={`${props.user.uname}`} /> + <img src={props.user.avatar} alt={`${props.user.uname}`} /> {props.user.uname} </Link> ); diff --git a/vnext/src/components/__tests__/Avatar.test.js b/vnext/src/components/__tests__/Avatar.test.js index e1a12912..e7221871 100644 --- a/vnext/src/components/__tests__/Avatar.test.js +++ b/vnext/src/components/__tests__/Avatar.test.js @@ -7,7 +7,7 @@ import renderer from 'react-test-renderer'; test('Avatar renders correctly', () => { const component = renderer.create( <MemoryRouter> - <Avatar user={{ uid: 1, uname: 'ugnich' }} /> + <Avatar user={{ uid: 1, uname: 'ugnich', avatar: 'https://juick.com/i/a/1-deadbeef.png' }} /> </MemoryRouter> ); let tree = component.toJSON(); diff --git a/vnext/src/components/__tests__/__snapshots__/Avatar.test.js.snap b/vnext/src/components/__tests__/__snapshots__/Avatar.test.js.snap index ef7be4ed..bbd39866 100644 --- a/vnext/src/components/__tests__/__snapshots__/Avatar.test.js.snap +++ b/vnext/src/components/__tests__/__snapshots__/Avatar.test.js.snap @@ -17,7 +17,7 @@ exports[`Avatar renders correctly 1`] = ` > <img alt="ugnich" - src="//i.juick.com/a/1.png" + src="https://juick.com/i/a/1-deadbeef.png" /> </a> </div> |