26 lines
768 B
JavaScript
26 lines
768 B
JavaScript
import CustomLoading from "@/app/component/loading/Custom";
|
|
import Image from "next/image";
|
|
|
|
function Slider({ data, loading }) {
|
|
return (
|
|
<ul className="flex md:hidden gap-2 w-full justify-start items-center overflow-auto hidden-scroll">
|
|
{[...data.images_clinic, ...data.images_clinic].map((item, idx) =>
|
|
idx !== 0 ? (
|
|
<CustomLoading width={90} height={90} loading={loading}>
|
|
<Image
|
|
key={idx}
|
|
src={item}
|
|
width={90}
|
|
height={90}
|
|
alt="image clinic"
|
|
className="min-w-[90px] min-h-[90px] object-cover rounded-[8px] overflow-hidden"
|
|
/>
|
|
</CustomLoading>
|
|
) : undefined
|
|
)}
|
|
</ul>
|
|
);
|
|
}
|
|
|
|
export default Slider;
|