Redux state: Allow multiple calls to be stored
This commit is contained in:
parent
753e0279c6
commit
3468de255d
21 changed files with 1191 additions and 515 deletions
|
@ -13,11 +13,7 @@ import enMessages from '../../_locales/en/messages.json';
|
|||
|
||||
const i18n = setupI18n('en', enMessages);
|
||||
|
||||
const callDetails = {
|
||||
callId: 0,
|
||||
isIncoming: true,
|
||||
isVideoCall: true,
|
||||
|
||||
const conversation = {
|
||||
id: '3051234567',
|
||||
avatarPath: undefined,
|
||||
color: 'ultramarine' as ColorType,
|
||||
|
@ -28,7 +24,7 @@ const callDetails = {
|
|||
};
|
||||
|
||||
const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
|
||||
callDetails: overrideProps.callDetails || callDetails,
|
||||
conversation: overrideProps.conversation || conversation,
|
||||
hangUp: action('hang-up'),
|
||||
hasLocalVideo: boolean('hasLocalVideo', overrideProps.hasLocalVideo || false),
|
||||
hasRemoteVideo: boolean(
|
||||
|
@ -50,8 +46,8 @@ story.add('Default', () => {
|
|||
|
||||
story.add('Contact (with avatar)', () => {
|
||||
const props = createProps({
|
||||
callDetails: {
|
||||
...callDetails,
|
||||
conversation: {
|
||||
...conversation,
|
||||
avatarPath: 'https://www.fillmurray.com/64/64',
|
||||
},
|
||||
});
|
||||
|
@ -60,8 +56,8 @@ story.add('Contact (with avatar)', () => {
|
|||
|
||||
story.add('Contact (no color)', () => {
|
||||
const props = createProps({
|
||||
callDetails: {
|
||||
...callDetails,
|
||||
conversation: {
|
||||
...conversation,
|
||||
color: undefined,
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue