瀏覽代碼

18 react update and prerender check

asmer 3 月之前
父節點
當前提交
ffe6f95fd8
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      src/SliderImage.js

+ 6 - 6
src/SliderImage.js

@@ -147,12 +147,12 @@ export default ({images = [], className, onChange, onClick, ref, current:propCur
         }
     }
 
-    if (window.navigator.userAgent.includes('Prerender')){
-        return (<img  src={images[0]} 
-                      alt={`image of good`} 
-                      style={{maxWidth: '50vw', maxHeight: '50vh'}}
-                        />)
-    }
+    // if (window.navigator.userAgent.includes('Prerender')){
+    //     return (<img  src={images[0]} 
+    //                   alt={`image of good`} 
+    //                   style={{maxWidth: '50vw', maxHeight: '50vh'}}
+    //                     />)
+    // }
 
     return (
         <div className={className}