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
21 changed files with 34 additions and 78 deletions

View File

@@ -18,13 +18,12 @@ export type PropsData = {
export type PropsHousekeeping = {
i18n: LocalizerType;
now: number;
};
export type Props = PropsData & PropsHousekeeping;
export const ChangeNumberNotification: React.FC<Props> = props => {
const { i18n, now, sender, timestamp } = props;
const { i18n, sender, timestamp } = props;
return (
<SystemMessage
@@ -38,7 +37,7 @@ export const ChangeNumberNotification: React.FC<Props> = props => {
i18n={i18n}
/>
&nbsp;·&nbsp;
<MessageTimestamp i18n={i18n} now={now} timestamp={timestamp} />
<MessageTimestamp i18n={i18n} timestamp={timestamp} />
</>
}
icon="phone"