Redux state: Allow multiple calls to be stored

This commit is contained in:
Evan Hahn 2020-11-06 11:36:37 -06:00 committed by GitHub
parent 753e0279c6
commit 3468de255d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 1191 additions and 515 deletions

View file

@ -15,11 +15,13 @@ const i18n = setupI18n('en', enMessages);
const defaultProps = {
acceptCall: action('accept-call'),
callDetails: {
call: {
conversationId: 'fake-conversation-id',
callId: 0,
isIncoming: true,
isVideoCall: true,
},
conversation: {
id: '3051234567',
avatarPath: undefined,
contactColor: 'ultramarine' as ColorType,
@ -33,24 +35,15 @@ const defaultProps = {
};
const permutations = [
{
title: 'Incoming Call Bar (no call details)',
props: {},
},
{
title: 'Incoming Call Bar (video)',
props: {
callDetails: {
...defaultProps.callDetails,
isVideoCall: true,
},
},
props: {},
},
{
title: 'Incoming Call Bar (audio)',
props: {
callDetails: {
...defaultProps.callDetails,
call: {
...defaultProps.call,
isVideoCall: false,
},
},
@ -69,10 +62,13 @@ storiesOf('Components/IncomingCallBar', module)
return (
<IncomingCallBar
{...defaultProps}
callDetails={{
...defaultProps.callDetails,
color,
call={{
...defaultProps.call,
isVideoCall,
}}
conversation={{
...defaultProps.conversation,
color,
name,
}}
/>