Abbreviate cmdk dates on mobile

This commit is contained in:
Sam Becker 2024-03-13 21:51:01 -05:00
parent 97c927cbe7
commit 6fdf215534

View File

@ -148,7 +148,14 @@ export default async function CommandK() {
items: photos.map(photo => ({
accessory: <PhotoTiny photo={photo} />,
label: titleForPhoto(photo),
annotation: formatDate(photo.takenAt),
annotation: <>
<span className="hidden sm:inline-block">
{formatDate(photo.takenAt)}
</span>
<span className="inline-block sm:hidden">
{formatDate(photo.takenAt, true)}
</span>
</>,
path: pathForPhoto(photo),
})),
}]