Add "call back", "call again" buttons to timeline

This commit is contained in:
Evan Hahn 2021-09-10 18:59:41 -05:00 committed by GitHub
parent d94f1151b1
commit bfa0bbf7da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 203 additions and 71 deletions

View file

@ -63,19 +63,31 @@ const createBoundOnHeightChange = memoizee(
{ max: 500 }
);
function renderItem(
messageId: string,
conversationId: string,
onHeightChange: (messageId: string) => unknown,
actionProps: TimelineActionsType,
containerElementRef: RefObject<HTMLElement>
): JSX.Element {
function renderItem({
actionProps,
containerElementRef,
conversationId,
messageId,
nextMessageId,
onHeightChange,
previousMessageId,
}: {
actionProps: TimelineActionsType;
containerElementRef: RefObject<HTMLElement>;
conversationId: string;
messageId: string;
nextMessageId: undefined | string;
onHeightChange: (messageId: string) => unknown;
previousMessageId: undefined | string;
}): JSX.Element {
return (
<SmartTimelineItem
{...actionProps}
containerElementRef={containerElementRef}
conversationId={conversationId}
id={messageId}
messageId={messageId}
previousMessageId={previousMessageId}
nextMessageId={nextMessageId}
onHeightChange={createBoundOnHeightChange(onHeightChange, messageId)}
renderEmojiPicker={renderEmojiPicker}
renderReactionPicker={renderReactionPicker}