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

Move data member to static data #56

Open
kelilipan opened this issue Jun 23, 2023 · 0 comments
Open

Move data member to static data #56

kelilipan opened this issue Jun 23, 2023 · 0 comments

Comments

@kelilipan
Copy link
Member

I just noticed that we fetch member data from external API, but sometimes error occurred if we visit https://ailabtelkom.github.io/member from other pages
image

this is because if we visit from other pages it fetches data from API(client side), but your API is broken hence the error happens wkwk

My solution is to keep all data static no getInitialProps(deprecated) only getStaticProps. Put the data(sheet) somewhere permanent(e.g google sheet? or JSON) because Heroku is not free anymore then fetch data using getStaticProps, the cons is you need to rebuild every time data is updated tapi emang seberapa sering datanya berubah? nah let's keep it static since we use GitHub pages to serve this page, static is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant