Open zainfathoni opened 3 years ago
Thanks for taking the initiative!
Since we're using getStaticProps
, the JSON
data source doesn't really matter, because it will be rebuilt by NextJS anyway. So to make things simple, I prefer the first approach because it requires no further processing into another JSON file.
I think merging wbw-vaccination-database.json
and wbw-database.json
directly in-memory within the getStaticProps
function should suffice.
Hi there, I'm interested to work on this but certainly it needs https://github.com/kawalcovid19/wargabantuwarga.com/issues/803 to be done.
I can think of two approaches to do this.
Approach 1 Read from both
wbw-vaccination-database.json
andwbw-database.json
when opening/provinces/[provinceSlug]
and replace theTempat Vaksin
inwbw-database.json
with ones fromwbw-vaccination-database.json
Approach 2 Combine
wbw-vaccination-database.json
andwbw-database.json
and create new file such ascontacts.json
. TheProvincePage
will read the Contacts from there.I think approach 2 is preferrable given the wbw architecture.
wdyt @zainfathoni ?