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 the wbw-vaccination-database.json data to replace all Tempat vaksin data from wbw-database.json #805

Open
Tracked by #802
zainfathoni opened this issue Oct 8, 2021 · 2 comments · May be fixed by #817
Open
Tracked by #802
Labels
hacktoberfest Issues for Hacktoberfest

Comments

@zainfathoni
Copy link
Member

No description provided.

@redhoyasa
Copy link

Hi there, I'm interested to work on this but certainly it needs #803 to be done.

I can think of two approaches to do this.

Approach 1
Read from both wbw-vaccination-database.json and wbw-database.json when opening /provinces/[provinceSlug] and replace the Tempat Vaksin in wbw-database.json with ones from wbw-vaccination-database.json

Approach 2
Combine wbw-vaccination-database.json and wbw-database.json and create new file such as contacts.json. The ProvincePage will read the Contacts from there.

I think approach 2 is preferrable given the wbw architecture.

wdyt @zainfathoni ?

@zainfathoni
Copy link
Member Author

zainfathoni commented Oct 13, 2021

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.

#803 should be closed soon, so get ready to work on it once it's closed, @redhoyasa. 😉

@redhoyasa redhoyasa linked a pull request Oct 29, 2021 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues for Hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants