overleaf/services/web/frontend/js/features/review-panel-new/components/review-panel-resolved-message.tsx
David 9416e69647 Merge pull request #19985 from overleaf/dp-resolved-threads
Implement redesigned resolved threads popover

GitOrigin-RevId: 4e462eb26a2f2f3194fca89c39d5f9d08ea2e33c
2024-08-20 08:04:35 +00:00

31 lines
1,014 B
TypeScript

import { FC } from 'react'
import { formatTimeBasedOnYear } from '@/features/utils/format-date'
import { buildName } from '../utils/build-name'
import { ReviewPanelResolvedCommentThread } from '../../../../../types/review-panel/comment-thread'
import { useTranslation } from 'react-i18next'
const ReviewPanelResolvedMessage: FC<{
thread: ReviewPanelResolvedCommentThread
}> = ({ thread }) => {
const { t } = useTranslation()
return (
<div className="review-panel-comment">
<div className="review-panel-entry-header">
<div>
<div className="review-panel-entry-user">
{buildName(thread.resolved_by_user)}
</div>
<div className="review-panel-entry-time">
{formatTimeBasedOnYear(thread.resolved_at)}
</div>
</div>
</div>
<div className="review-panel-comment-body review-panel-resolved-message">
<i>{t('marked_as_resolved')}</i>
</div>
</div>
)
}
export default ReviewPanelResolvedMessage