You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/07/15 13:38:51 UTC

[GitHub] [apisix-website] 1502shivam-singh commented on a change in pull request #414: feat: Add home page lead window for 200 contributors blogs

1502shivam-singh commented on a change in pull request #414:
URL: https://github.com/apache/apisix-website/pull/414#discussion_r670470777



##########
File path: website/src/pages/index.js
##########
@@ -261,22 +261,23 @@ const NewsletterSection = () => {
 const PicPoster = () => {
   const [display, setDisplay] = useState(true);
   const [theme, setTheme] = useState('light');
+  const windowGlobal = typeof window !== 'undefined' && window

Review comment:
       Just do window.getItem inside useEffect instead of this. This will always put undefined on windowGlobal at build as window is not defined when SSR.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org