[questions][ui] add calendar icon to timestamp

pull/549/head
Jeff Sieu 2 years ago
parent 9c84b87d5a
commit 2360c07aec

@ -2,6 +2,7 @@ import clsx from 'clsx';
import { useMemo, useState } from 'react'; import { useMemo, useState } from 'react';
import { import {
BuildingOfficeIcon, BuildingOfficeIcon,
CalendarIcon,
MapPinIcon, MapPinIcon,
UserCircleIcon, UserCircleIcon,
} from '@heroicons/react/20/solid'; } from '@heroicons/react/20/solid';
@ -224,12 +225,15 @@ export default function BaseQuestionCard({
</> </>
)} )}
{timestamp !== null && ( {timestamp !== null && (
<p className="text-xs"> <div className="flex items-center text-slate-500">
{timestamp.toLocaleDateString(undefined, { <CalendarIcon className="mr-1.5 h-5 w-5 flex-shrink-0 text-slate-400" />
month: 'short', <p className="text-xs font-medium">
year: 'numeric', {timestamp.toLocaleDateString(undefined, {
})} month: 'short',
</p> year: 'numeric',
})}
</p>
</div>
)} )}
{showAddToList && ( {showAddToList && (
<div className="pl-4"> <div className="pl-4">

Loading…
Cancel
Save