Commit c7f4dc4f by Arjun Jhukal

updated the new usp icon issue

parent 25066b6c
...@@ -9,15 +9,17 @@ interface UspItem { ...@@ -9,15 +9,17 @@ interface UspItem {
title: string; title: string;
description: string; description: string;
icon: string; icon: string;
icon_url?: string;
} }
export default function UspSlider({ uspData }: { uspData: { title: string; description: string; icon: string }[] }) { export default function UspSlider({ uspData }: { uspData: UspItem[] }) {
const [items, setItems] = useState<UspItem[]>([]); const [items, setItems] = useState<UspItem[]>([]);
const containerRef = useRef<HTMLDivElement>(null); const containerRef = useRef<HTMLDivElement>(null);
const x = useMotionValue(0); const x = useMotionValue(0);
console.log(uspData);
// Duplicate the data for seamless loop // Duplicate the data for seamless loop
useEffect(() => { useEffect(() => {
setItems([...uspData, ...uspData, ...uspData]); setItems([...uspData, ...uspData, ...uspData]);
...@@ -65,7 +67,7 @@ export default function UspSlider({ uspData }: { uspData: { title: string; descr ...@@ -65,7 +67,7 @@ export default function UspSlider({ uspData }: { uspData: { title: string; descr
> >
<Image <Image
src={item.icon || "/assets/images/fallback.png"} src={item.icon_url || "/assets/images/fallback.png"}
alt={item.title} alt={item.title}
width={66} width={66}
height={66} height={66}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment