Use a hook for the ever-updating now

This commit is contained in:
Josh Perez 2022-03-08 14:11:11 -05:00 committed by GitHub
parent f8724e91da
commit 4e48d7792b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 34 additions and 78 deletions

View file

@ -414,13 +414,11 @@ const renderItem = ({
containerElementRef,
containerWidthBreakpoint,
isOldestTimelineItem,
now,
}: {
messageId: string;
containerElementRef: React.RefObject<HTMLElement>;
containerWidthBreakpoint: WidthBreakpoint;
isOldestTimelineItem: boolean;
now: number;
}) => (
<TimelineItem
getPreferredBadge={() => undefined}
@ -432,7 +430,6 @@ const renderItem = ({
item={items[messageId]}
previousItem={undefined}
nextItem={undefined}
now={now}
i18n={i18n}
interactionMode="keyboard"
theme={ThemeType.light}