task-fixdatetime

This commit is contained in:
phaichayon
2026-06-25 21:09:27 +07:00
parent 3bf3405c48
commit 14acee1127
36 changed files with 4788 additions and 1011 deletions

View File

@@ -2,6 +2,7 @@
import { FormEvent, useCallback, useEffect, useRef, useState } from 'react';
import { useReducedMotion } from 'motion/react';
import { formatTime } from '@/lib/date-format';
import { useChatStore } from '../utils/store';
import type { Attachment, Message } from '../utils/types';
import { ConversationList } from './conversation-list';
@@ -72,10 +73,7 @@ export function Messenger() {
const delay = shouldReduceMotion ? 0 : 900;
replyTimeoutRef.current = window.setTimeout(() => {
const timestamp = new Date().toLocaleTimeString('en-US', {
hour: '2-digit',
minute: '2-digit'
});
const timestamp = formatTime(new Date());
const incoming: Message = {
id: 'incoming-' + Date.now().toString(),
sender: 'contact',