Fix stretching of event cards

This commit is contained in:
Nicolas Mowen 2024-06-04 06:48:32 -06:00
parent 95385c8aa7
commit 2a0a8a5e85

View File

@ -668,27 +668,32 @@ function Timeline({
<Skeleton className="size-full" /> <Skeleton className="size-full" />
) )
) : ( ) : (
<div <div className="h-full overflow-auto bg-secondary">
className={`grid h-full grid-cols-1 gap-4 overflow-auto bg-secondary p-4 ${isDesktop ? "" : "sm:grid-cols-2"}`} <div
> className={cn(
{mainCameraReviewItems.map((review) => { "grid h-auto grid-cols-1 gap-4 overflow-auto p-4",
if (review.severity == "significant_motion") { isMobile && "sm:grid-cols-2",
return; )}
} >
{mainCameraReviewItems.map((review) => {
if (review.severity == "significant_motion") {
return;
}
return ( return (
<ReviewCard <ReviewCard
key={review.id} key={review.id}
event={review} event={review}
currentTime={currentTime} currentTime={currentTime}
onClick={() => { onClick={() => {
setScrubbing(true); setScrubbing(true);
setCurrentTime(review.start_time - REVIEW_PADDING); setCurrentTime(review.start_time - REVIEW_PADDING);
setScrubbing(false); setScrubbing(false);
}} }}
/> />
); );
})} })}
</div>
</div> </div>
)} )}
</div> </div>