bchiang7/v4

Footer cannot display stars and forks

Opened this issue · 1 comments

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

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.