diff --git a/src/components/LocaleContextProvider.tsx b/src/components/LocaleContextProvider.tsx index 2fa4e1c749e6..2e68197bbaf0 100644 --- a/src/components/LocaleContextProvider.tsx +++ b/src/components/LocaleContextProvider.tsx @@ -36,7 +36,7 @@ type LocaleContextProps = { datetimeToRelative: (datetime: string) => string; /** Formats a datetime to local date and time string */ - datetimeToCalendarTime: (datetime: string, includeTimezone: boolean, isLowercase: boolean) => string; + datetimeToCalendarTime: (datetime: string, includeTimezone: boolean, isLowercase?: boolean) => string; /** Updates date-fns internal locale */ updateLocale: () => void; diff --git a/src/pages/home/report/ReportActionItemThread.tsx b/src/pages/home/report/ReportActionItemThread.tsx index 8490d3d61ea4..e38021cf6ec1 100644 --- a/src/pages/home/report/ReportActionItemThread.tsx +++ b/src/pages/home/report/ReportActionItemThread.tsx @@ -6,7 +6,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Report from '@userActions/Report'; import CONST from '@src/CONST'; -import {Icon} from '@src/types/onyx/OnyxCommon'; +import type {Icon} from '@src/types/onyx/OnyxCommon'; type ReportActionItemThreadProps = { /** List of participant icons for the thread */ @@ -31,12 +31,12 @@ type ReportActionItemThreadProps = { function ReportActionItemThread({numberOfReplies, icons, mostRecentReply, childReportID, isHovered, onSecondaryInteraction}: ReportActionItemThreadProps) { const styles = useThemeStyles(); - const {translate, datetimeToRelative} = useLocalize(); + const {translate, datetimeToCalendarTime} = useLocalize(); const numberOfRepliesText = numberOfReplies > CONST.MAX_THREAD_REPLIES_PREVIEW ? `${CONST.MAX_THREAD_REPLIES_PREVIEW}+` : `${numberOfReplies}`; const replyText = numberOfReplies === 1 ? translate('threads.reply') : translate('threads.replies'); - const timeStamp = datetimeToRelative(mostRecentReply); + const timeStamp = datetimeToCalendarTime(mostRecentReply, false); return (