Add month to the new video badge

pull/1657/head
Kamran Ahmed 3 years ago
parent 913b591988
commit 0d18c02b76
  1. 2
      pages/index.tsx

@ -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}

Loading…
Cancel
Save