File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ export const Carousel: FunctionComponent<CarouselProps> = (userProps: CarouselPr
55
55
const [ page , setPage ] = useState < number > ( 0 ) ;
56
56
const isPaginating = useRef ( false ) ;
57
57
const slideButtonRef = useRef < HTMLDivElement > ( null ) ;
58
- const autoSwipeTimer = useRef < NodeJS . Timeout | number > ( 0 ) ;
58
+ const autoSwipeTimer = useRef < number > ( 0 ) ;
59
59
const isNavigation = typeof props . navigation === 'function' ;
60
60
61
61
if ( props . dynamic ) {
@@ -86,14 +86,14 @@ export const Carousel: FunctionComponent<CarouselProps> = (userProps: CarouselPr
86
86
} , [ ] ) ;
87
87
88
88
const autoSwipe = ( ) => {
89
- clearTimeout ( autoSwipeTimer . current as number ) ;
89
+ clearTimeout ( autoSwipeTimer . current ) ;
90
90
91
91
if (
92
92
slideButtonRef &&
93
93
typeof props . autoSwipe === 'number' &&
94
94
props . autoSwipe > props . transition
95
95
) {
96
- autoSwipeTimer . current = setTimeout ( ( ) => {
96
+ autoSwipeTimer . current = window . setTimeout ( ( ) => {
97
97
if ( showArrow . right ) {
98
98
slide ( SlideDirection . Right ) ;
99
99
} else {
You can’t perform that action at this time.
0 commit comments