Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions components/achievements/infiniteSlider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,31 @@ const InfiniteSlider = ({ data, direction }) => {
}, 1000);
return () => clearTimeout(delay);
}, []);

const moveRight = direction === "right" || direction === true;

return (
<div>
<div className="w-full flex justify-center items-center">
{showSlider && (
<Slider toRight={direction} blurBoderColor={'black'}>
<Slider
toRight={moveRight}
blurBorderColor="black"
duration={90}
>
{data.map((company, index) => (
<div className="flex justify-center items-center" key={index}>
<Slider.Slide className="">
<img
src={company.img_path}
alt={company.alt}
className="md:w-44 md:h-44"
/>
</Slider.Slide>
</div>
<Slider.Slide key={index}>
<img
src={company.img_path}
alt={company.alt || `company-${index}`}
className="md:w-44 md:h-44 object-contain"
/>
</Slider.Slide>
))}
</Slider>
)}
</div>
);
};


export default InfiniteSlider;