Skip to content

Move data member to static data #56

Description

@kelilipan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions