A personal media tracker built on the AT Protocol opnshelf.xyz
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

style: improve code formatting and indentation in dashboard

+30 -16
+30 -16
apps/web/src/routes/index.tsx
··· 90 90 const date = new Date(dateStr); 91 91 const now = new Date(); 92 92 const isThisYear = date.getFullYear() === now.getFullYear(); 93 - const timeString = date.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" }); 94 - 93 + const timeString = date.toLocaleTimeString("en-US", { 94 + hour: "numeric", 95 + minute: "2-digit", 96 + }); 97 + 95 98 if (isThisYear) { 96 - const formattedDate = date.toLocaleDateString("en-US", { month: "short", day: "numeric" }); 99 + const formattedDate = date.toLocaleDateString("en-US", { 100 + month: "short", 101 + day: "numeric", 102 + }); 97 103 return `${formattedDate} at ${timeString}`; 98 104 } 99 - const formattedDate = date.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }); 105 + const formattedDate = date.toLocaleDateString("en-US", { 106 + month: "short", 107 + day: "numeric", 108 + year: "numeric", 109 + }); 100 110 return `${formattedDate} at ${timeString}`; 101 111 } 102 112 ··· 373 383 ) : displayContent.length > 0 ? ( 374 384 <div className="grid gap-4 sm:grid-cols-2 xl:grid-cols-3"> 375 385 {displayContent.map((item) => ( 376 - <MediaCard 377 - key={item.id} 378 - id={item.id} 379 - title={item.title} 380 - posterUrl={item.posterUrl} 381 - backdropUrl={item.backdropUrl} 382 - type={item.type} 383 - year={item.year} 384 - watchedDate={item.watchedDate ? formatWatchedDate(item.watchedDate) : undefined} 385 - layout="backdrop" 386 - size="md" 387 - /> 386 + <MediaCard 387 + key={item.id} 388 + id={item.id} 389 + title={item.title} 390 + posterUrl={item.posterUrl} 391 + backdropUrl={item.backdropUrl} 392 + type={item.type} 393 + year={item.year} 394 + watchedDate={ 395 + item.watchedDate 396 + ? formatWatchedDate(item.watchedDate) 397 + : undefined 398 + } 399 + layout="backdrop" 400 + size="md" 401 + /> 388 402 ))} 389 403 </div> 390 404 ) : (