1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-09-09 16:53:33 +02:00

Add month to the new video badge

This commit is contained in:
Kamran Ahmed
2022-08-29 17:39:33 +04:00
parent 913b591988
commit 0d18c02b76

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}