Make onHeightChange a required prop of <ConversationHero>

This commit is contained in:
Evan Hahn 2021-09-16 16:44:00 -05:00 committed by GitHub
parent 89fc7d2c0c
commit 11855d1585
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 2 deletions

View file

@ -40,6 +40,7 @@ storiesOf('Components/Conversation/ConversationHero', module)
updateSharedGroups={updateSharedGroups}
sharedGroupNames={['NYC Rock Climbers', 'Dinner Party', 'Friends 🌿']}
unblurAvatar={action('unblurAvatar')}
onHeightChange={action('onHeightChange')}
/>
</div>
);
@ -61,6 +62,7 @@ storiesOf('Components/Conversation/ConversationHero', module)
updateSharedGroups={updateSharedGroups}
sharedGroupNames={['NYC Rock Climbers', 'Dinner Party']}
unblurAvatar={action('unblurAvatar')}
onHeightChange={action('onHeightChange')}
/>
</div>
);
@ -82,6 +84,7 @@ storiesOf('Components/Conversation/ConversationHero', module)
updateSharedGroups={updateSharedGroups}
sharedGroupNames={['NYC Rock Climbers']}
unblurAvatar={action('unblurAvatar')}
onHeightChange={action('onHeightChange')}
/>
</div>
);
@ -103,6 +106,7 @@ storiesOf('Components/Conversation/ConversationHero', module)
updateSharedGroups={updateSharedGroups}
sharedGroupNames={[]}
unblurAvatar={action('unblurAvatar')}
onHeightChange={action('onHeightChange')}
/>
</div>
);
@ -124,6 +128,7 @@ storiesOf('Components/Conversation/ConversationHero', module)
updateSharedGroups={updateSharedGroups}
sharedGroupNames={[]}
unblurAvatar={action('unblurAvatar')}
onHeightChange={action('onHeightChange')}
/>
</div>
);
@ -145,6 +150,7 @@ storiesOf('Components/Conversation/ConversationHero', module)
updateSharedGroups={updateSharedGroups}
sharedGroupNames={[]}
unblurAvatar={action('unblurAvatar')}
onHeightChange={action('onHeightChange')}
/>
</div>
);
@ -165,6 +171,7 @@ storiesOf('Components/Conversation/ConversationHero', module)
sharedGroupNames={[]}
unblurAvatar={action('unblurAvatar')}
updateSharedGroups={updateSharedGroups}
onHeightChange={action('onHeightChange')}
/>
</div>
);
@ -185,6 +192,7 @@ storiesOf('Components/Conversation/ConversationHero', module)
sharedGroupNames={[]}
unblurAvatar={action('unblurAvatar')}
updateSharedGroups={updateSharedGroups}
onHeightChange={action('onHeightChange')}
/>
</div>
);
@ -203,6 +211,7 @@ storiesOf('Components/Conversation/ConversationHero', module)
sharedGroupNames={[]}
unblurAvatar={action('unblurAvatar')}
updateSharedGroups={updateSharedGroups}
onHeightChange={action('onHeightChange')}
/>
</div>
);
@ -221,6 +230,7 @@ storiesOf('Components/Conversation/ConversationHero', module)
sharedGroupNames={[]}
unblurAvatar={action('unblurAvatar')}
updateSharedGroups={updateSharedGroups}
onHeightChange={action('onHeightChange')}
/>
</div>
);
@ -240,6 +250,7 @@ storiesOf('Components/Conversation/ConversationHero', module)
sharedGroupNames={[]}
unblurAvatar={action('unblurAvatar')}
updateSharedGroups={updateSharedGroups}
onHeightChange={action('onHeightChange')}
/>
</div>
);
@ -259,6 +270,7 @@ storiesOf('Components/Conversation/ConversationHero', module)
sharedGroupNames={[]}
unblurAvatar={action('unblurAvatar')}
updateSharedGroups={updateSharedGroups}
onHeightChange={action('onHeightChange')}
/>
</div>
);
@ -277,6 +289,7 @@ storiesOf('Components/Conversation/ConversationHero', module)
sharedGroupNames={[]}
unblurAvatar={action('unblurAvatar')}
updateSharedGroups={updateSharedGroups}
onHeightChange={action('onHeightChange')}
/>
</div>
);
@ -294,6 +307,7 @@ storiesOf('Components/Conversation/ConversationHero', module)
sharedGroupNames={[]}
unblurAvatar={action('unblurAvatar')}
updateSharedGroups={updateSharedGroups}
onHeightChange={action('onHeightChange')}
/>
</div>
);

View file

@ -19,7 +19,7 @@ export type Props = {
i18n: LocalizerType;
isMe: boolean;
membersCount?: number;
onHeightChange?: () => unknown;
onHeightChange: () => unknown;
phoneNumber?: string;
sharedGroupNames?: Array<string>;
unblurAvatar: () => void;
@ -134,7 +134,7 @@ export const ConversationHero = ({
}
window.log.info('ConversationHero: calling onHeightChange');
onHeightChange?.();
onHeightChange();
}, [
about,
conversationType,

View file

@ -418,6 +418,7 @@ const renderHeroRow = () => (
profileName={getProfileName()}
phoneNumber={getPhoneNumber()}
conversationType="direct"
onHeightChange={action('onHeightChange in ConversationHero')}
sharedGroupNames={['NYC Rock Climbers', 'Dinner Party']}
unblurAvatar={action('unblurAvatar')}
updateSharedGroups={noop}