Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use getStaticProps for /contributors page #827

Closed
max-programming opened this issue Aug 1, 2021 · 0 comments · Fixed by #828
Closed

Use getStaticProps for /contributors page #827

max-programming opened this issue Aug 1, 2021 · 0 comments · Fixed by #828
Labels
improvement Website improvements

Comments

@max-programming
Copy link
Contributor

Describe the bug
I recently noticed that Gitmoji is using the simple fetching strategy and I would suggest using something better instead. In Next.js, as we have the getStaticProps method, if we use that method, it fetches the data at build time and the data is ready there so our page is no longer loading images.

So whenever a PR is merged, the data is fetched by getStaticProps and the contributors page is ready to view with all the contributors quickly.

I made the change on gitmoji locally, it worked out very well with no issues. But the tests are coming my way. I am not familiar with testing. I tried every possible way to push the changes and make a PR but the tests are stopping me so we will need to change the tests.

To Reproduce
Steps to reproduce the behavior:

  1. Fix the tests for the component.

Expected behavior
The tests should pass successfully.

Screenshots
image

@carloscuesta carloscuesta added the improvement Website improvements label Aug 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
improvement Website improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants