Mark TimelineItem memo() to fix send perf regression

This commit is contained in:
Jamie Kyle 2023-04-19 15:42:39 -07:00 committed by GitHub
parent 6f67a57e8a
commit 30a913161d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { ReactChild, RefObject } from 'react';
import React from 'react';
import React, { memo } from 'react';
import type { LocalizerType, ThemeType } from '../../types/Util';
@ -184,7 +184,7 @@ export type PropsType = PropsLocalType &
| 'shouldHideMetadata'
>;
export function TimelineItem({
export const TimelineItem = memo(function TimelineItem({
containerElementRef,
conversationId,
getPreferredBadge,
@ -375,4 +375,4 @@ export function TimelineItem({
}
return itemContents;
}
});