mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-25 04:36:46 +00:00
Use a hook for the ever-updating now
This commit is contained in:
@@ -9,9 +9,9 @@ import { formatTime } from '../../util/timestamp';
|
||||
|
||||
import type { LocalizerType } from '../../types/Util';
|
||||
import { Time } from '../Time';
|
||||
import { useNowThatUpdatesEveryMinute } from '../../hooks/useNowThatUpdatesEveryMinute';
|
||||
|
||||
export type Props = {
|
||||
now: number;
|
||||
timestamp: number;
|
||||
module?: string;
|
||||
withImageNoCaption?: boolean;
|
||||
@@ -25,12 +25,12 @@ export function MessageTimestamp({
|
||||
direction,
|
||||
i18n,
|
||||
module,
|
||||
now,
|
||||
timestamp,
|
||||
withImageNoCaption,
|
||||
withSticker,
|
||||
withTapToViewExpired,
|
||||
}: Readonly<Props>): ReactElement {
|
||||
const now = useNowThatUpdatesEveryMinute();
|
||||
const moduleName = module || 'module-timestamp';
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user