[resumes][refactor] standardise upload date formatting

pull/385/head
Wu Peirong 2 years ago
parent 966cf2e8d6
commit 4d22edabd0

@ -55,8 +55,9 @@ export default function ResumeListItem({ href, resumeInfo }: Props) {
</div>
<div className="col-span-3 self-center text-sm text-slate-500">
<div>
Uploaded {formatDistanceToNow(resumeInfo.createdAt)} ago by{' '}
{resumeInfo.user}
{`Uploaded ${formatDistanceToNow(resumeInfo.createdAt, {
addSuffix: true,
})} by ${resumeInfo.user}`}
</div>
<div className="mt-2 text-slate-400">{resumeInfo.location}</div>
</div>

@ -178,10 +178,9 @@ export default function ResumeReviewPage() {
aria-hidden="true"
className="mr-1.5 h-5 w-5 flex-shrink-0 text-gray-400"
/>
{`Uploaded ${formatDistanceToNow(
new Date(detailsQuery.data.createdAt),
{ addSuffix: true },
)} by ${detailsQuery.data.user.name}`}
{`Uploaded ${formatDistanceToNow(detailsQuery.data.createdAt, {
addSuffix: true,
})} by ${detailsQuery.data.user.name}`}
</div>
</div>
{detailsQuery.data.additionalInfo && (

Loading…
Cancel
Save