Ivan Asmer 3 lat temu
rodzic
commit
a66d83a1a6
1 zmienionych plików z 0 dodań i 4 usunięć
  1. 0 4
      src/index.js

+ 0 - 4
src/index.js

@@ -14,8 +14,6 @@ export const SliderImage = ({images = [], className, ...props}) => {
         if (divRef.current){
             const div  = divRef.current
 
-            console.log(imgs)
-
             const totalWidth = imgs.reduce((total, img) => total + (img?.getBoundingClientRect().width || 0),0)
             div.style.width = totalWidth + 'px'
         }
@@ -32,7 +30,6 @@ export const SliderImage = ({images = [], className, ...props}) => {
             autoscroll.current = true
             const {scrollLeft} =  el
             const diff = (currentScrollPosition.current - scrollLeft) /5
-            console.log()
             if (Math.abs(diff) > 1){
                 el.scrollTo(scrollLeft + diff, 0)
                 setTimeout(step, 20)
@@ -82,7 +79,6 @@ export const SliderImage = ({images = [], className, ...props}) => {
                     newCurrent++
                 }
             }
-            console.log(newCurrent, currentScrollPosition.current)
             setCurrent(newCurrent)
             if (newCurrent === current) scrollToCurrent()
         }, 200)