Skip to content
This repository was archived by the owner on Feb 10, 2022. It is now read-only.

Commit 97f0b93

Browse files
committed
[CALLS-700]Call history design implementation
1. add profile image loading error exception.
1 parent 61d7724 commit 97f0b93

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/assets/icon-avatar.jpg

1.68 KB
Loading

lib/views/CallLogItem.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import SendBirdCall from 'sendbird-calls';
21
import outgoingVideo from '../assets/icon-call-video-outgoing-filled.svg';
32
import incomingVideo from '../assets/icon-call-video-incoming-filled.svg';
43
import outgoingVoice from '../assets/icon-call-voice-outgoing-filled.svg';
54
import incomingVoice from '../assets/icon-call-voice-incoming-filled.svg';
5+
import avatarIcon from '../assets/icon-avatar.svg';
66

77
import { createListItem, createDiv, createImg, createLabel } from "../utils/domUtil";
8-
import { sheet, classes } from "../css/styles";
8+
import { classes } from "../css/styles";
99

1010
export class CallLogItem {
1111
constructor({ callLogInfo, className }) {
@@ -44,7 +44,10 @@ export class CallLogItem {
4444
const callTypeDiv = createDiv({ className: `${classes['callLogTypeDiv']}` });
4545
callTypeDiv.appendChild(icoCallType);
4646

47-
const profileImg = createImg({ className: `${classes['callLogProfileImg']}`, src: profileImage });
47+
const profileImg = createImg({ className: `${classes['callLogProfileImg']}`, src: profileImage, onerror: (error) => {
48+
error.currentTarget.src = avatarIcon;
49+
} });
50+
4851
const profileDiv = createDiv({ className: `${classes['callLogProfileDiv']}` });
4952
profileDiv.appendChild(profileImg);
5053

0 commit comments

Comments
 (0)