bchiang7 / v4

Fourth iteration of my personal website built with Gatsby
https://v4.brittanychiang.com/
MIT License
7.47k stars 3.68k forks source link

Footer cannot display stars and forks #320

Open LeKZzzz opened 4 weeks ago

LeKZzzz commented 4 weeks ago

The star and fork in Footer cannot be displayed like the demo(https://v4.brittanychiang.com/) in my deployment.

This is the demo: 1

And this is my deployment: 2

Maybe the useEffect function in src/components/footer.js is not working properly. 3

But I'm not a professional front-end developer, it's just my guess, haha:)

My environment is as follows:

  1. Ubuntu 20.04
  2. Gatsby CLI version: 5.13.3
  3. Gatsby version: 3.15.0
  4. Node: 20.9.0
LeKZzzz commented 4 weeks ago

I think I have found the problem. I did not set NODE_ENV to 'production' to cause the function to return. However, after I use export NODE_ENV=production, gatsby develop will have an error, so my current solution is to directly comment out the environment judgment.I'll appreciate it if there is a better way.