From 9b3eeeb501c12d4daeda23a81e2ce312b645d41c Mon Sep 17 00:00:00 2001 From: Aratramba Date: Mon, 25 Jan 2021 14:10:02 +0100 Subject: [PATCH 1/2] add missing month and remove wrong month index --- src/shared/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 7a139df..777591f 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -7,6 +7,6 @@ export function formatSize(size: number) { export function formatDate(date: string) { const d = new Date(date); - const months = ['Jan', 'Feb', 'Mar', 'Apr', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; - return `${months[d.getMonth() - 1]} ${d.getDate()}, ${d.getFullYear()}`; + const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + return `${months[d.getMonth()]} ${d.getDate()}, ${d.getFullYear()}`; } From b423b5d9d05bc403fc6e7a282011ebc071aa14d7 Mon Sep 17 00:00:00 2001 From: Aratramba Date: Thu, 28 Jan 2021 08:52:20 +0100 Subject: [PATCH 2/2] add loading=lazy to thumbnails in mediagrid and medialist --- src/components/MediaGrid.tsx | 2 +- src/components/MediaList.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MediaGrid.tsx b/src/components/MediaGrid.tsx index 2c76ec6..5374d56 100644 --- a/src/components/MediaGrid.tsx +++ b/src/components/MediaGrid.tsx @@ -105,7 +105,7 @@ export const MediaGrid = ({ const ImageItem = ({ alt, onClick, onDoubleClick, selected, url }: MediaItemProps) => ( onClick(e)} onDoubleClick={onDoubleClick}> - {alt} + {alt} ); diff --git a/src/components/MediaList.tsx b/src/components/MediaList.tsx index 9f629db..cc125c0 100644 --- a/src/components/MediaList.tsx +++ b/src/components/MediaList.tsx @@ -165,7 +165,7 @@ const MediaRow = ({
{_type === 'sanity.imageAsset' ? ( - + ) : (