Fix
This commit is contained in:
@@ -5,10 +5,16 @@ import Link from "next/link";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
|
||||
import { Reveal } from "@/components/Reveal";
|
||||
import type { NewsItem } from "@/data/site";
|
||||
import type { DisplayNewsItem } from "@/lib/api";
|
||||
|
||||
/** Horizontal snap-scroll rail of news/blog cards, matching the site's other carousels. */
|
||||
export function NewsCarousel({ items, basePath }: { items: NewsItem[]; basePath: string }) {
|
||||
export function NewsCarousel({
|
||||
items,
|
||||
basePath,
|
||||
}: {
|
||||
items: DisplayNewsItem[];
|
||||
basePath: string;
|
||||
}) {
|
||||
const trackRef = useRef<HTMLUListElement>(null);
|
||||
const [atStart, setAtStart] = useState(true);
|
||||
const [atEnd, setAtEnd] = useState(false);
|
||||
@@ -92,7 +98,6 @@ export function NewsCarousel({ items, basePath }: { items: NewsItem[]; basePath:
|
||||
fill
|
||||
quality={80}
|
||||
sizes="(max-width: 640px) 82vw, (max-width: 1024px) 52vw, 26rem"
|
||||
placeholder="blur"
|
||||
loading={i < 2 ? "eager" : "lazy"}
|
||||
className="object-cover transition-transform duration-[1100ms] ease-out-soft group-hover:scale-[1.06]"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user