chore(omnichannel): remove moment dependency from ChatInfo#38686
chore(omnichannel): remove moment dependency from ChatInfo#38686sezallagwal wants to merge 1 commit intoRocketChat:developfrom
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
WalkthroughA refactoring that replaces moment.js-based date-time formatting with project-specific formatting hooks ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Removes
momentfromChatInfo.tsxin favor of the existingformatDurationhook and nativeDatearithmetic, keeping the codebase consistent with the project's own formatting utilities.Changes
import moment from 'moment'moment(closedAt).from(moment(ts), true)withformatDuration+ nativeDatefor Chat Durationmoment(responseBy.lastMessageTs).fromNow(true)withformatDuration+ nativeDatefor Inactivity Timetsnullability guard on the Chat Duration conditionalSummary by CodeRabbit