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.localStorage.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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to