SDA-4241 - Move click handler on to button (#1905)

Signed-off-by: Kiran Niranjan <kiran.niranjan@symphony.com>
This commit is contained in:
Kiran Niranjan 2023-07-21 12:25:17 +05:30 committed by GitHub
parent f8ac374c54
commit 695db74438
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -205,22 +205,20 @@ export default class CallNotification extends React.Component<
</div> </div>
<div className='actions'> <div className='actions'>
<button <button
data-testid='CALL_NOTIFICATION_REJECT_BUTTON'
className={classNames('decline', { className={classNames('decline', {
'call-type-other': callType === 'OTHER', 'call-type-other': callType === 'OTHER',
})} })}
>
<div
data-testid='CALL_NOTIFICATION_REJECT_BUTTON'
className='label'
onClick={this.eventHandlers.onReject(id)} onClick={this.eventHandlers.onReject(id)}
> >
{rejectText} <div className='label'>{rejectText}</div>
</div>
</button> </button>
<button <button
data-testid='CALL_NOTIFICATION_ACCEPT_BUTTON'
className={classNames('accept', { className={classNames('accept', {
'call-type-other': callType === 'OTHER', 'call-type-other': callType === 'OTHER',
})} })}
onClick={this.eventHandlers.onAccept(id)}
> >
{actionIconUrl ? ( {actionIconUrl ? (
<img <img
@ -238,13 +236,7 @@ export default class CallNotification extends React.Component<
className='profile-picture-badge' className='profile-picture-badge'
/> />
)} )}
<div <div className='label'>{acceptText}</div>
data-testid='CALL_NOTIFICATION_ACCEPT_BUTTON'
className='label'
onClick={this.eventHandlers.onAccept(id)}
>
{acceptText}
</div>
</button> </button>
</div> </div>
</div> </div>