|
|
@ -1,7 +1,8 @@ |
|
|
|
// matchMedia polyfill for
|
|
|
|
// https://github.com/WickyNilliams/enquire.js/issues/82
|
|
|
|
import React from 'react'; |
|
|
|
import debounce from 'lodash.debounce'; |
|
|
|
|
|
|
|
// matchMedia polyfill for
|
|
|
|
// https://github.com/WickyNilliams/enquire.js/issues/82
|
|
|
|
if (typeof window !== 'undefined') { |
|
|
|
const matchMediaPolyfill = (mediaQuery: string): MediaQueryList => { |
|
|
|
return { |
|
|
@ -15,9 +16,11 @@ if (typeof window !== 'undefined') { |
|
|
|
}; |
|
|
|
window.matchMedia = window.matchMedia || matchMediaPolyfill; |
|
|
|
} |
|
|
|
|
|
|
|
import SlickCarousel from 'react-slick'; |
|
|
|
import React from 'react'; |
|
|
|
// Use require over import (will be lifted up)
|
|
|
|
// make sure matchMedia polyfill run before require('react-slick')
|
|
|
|
// Fix https://github.com/ant-design/ant-design/issues/6560
|
|
|
|
// Fix https://github.com/ant-design/ant-design/issues/3308
|
|
|
|
const SlickCarousel = require('react-slick').default; |
|
|
|
|
|
|
|
export type CarouselEffect = 'scrollx' | 'fade'; |
|
|
|
// Carousel
|
|
|
|