Skip to content

Commit

Permalink
fix type import, date format
Browse files Browse the repository at this point in the history
  • Loading branch information
pasyukevich committed Dec 15, 2023
1 parent 9a66001 commit 83b093e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/LocaleContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/pages/home/report/ReportActionItemThread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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 (
<View style={[styles.chatItemMessage]}>
Expand Down

0 comments on commit 83b093e

Please sign in to comment.