Add month to the new video badge

This commit is contained in:
Kamran Ahmed committed 2022-08-29 17:39:33 +04:00
1 parent 913b591988
commit 0d18c02b76
1 file changed
+1 -1
+1 -1
View File
@@ -77,7 +77,7 @@ export default function Home(props: HomeProps) {
target={'_blank'}
key={video.id}
href={video.youtubeLink!}
badgeText={video.isNew ? 'NEW' : ''}
badgeText={video.isNew ? `NEW · ${(new Date(video.createdAt)).toLocaleDateString('en-us', { month: 'long'})}` : ''}
hideSubtitleOnMobile
title={video.title}
subtitle={video.duration}