Replace fetches from internal APIs with function calls
Description
The Next.js documentation explains that fetching data from an API route from the same server is a bad idea.
This was fixed for user profiles in #4997 .
The following pages need to be updated to follow the same style:
- [ ] pages/map.js
- [ ] pages/events.js - #5152
- [ ] pages/account/statistics.js
- [ ] pages/index.js - #5124
- [ ] pages/search.js
It's great having you contribute to this project
Welcome to the community :nerd_face:If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord chat and our GitHub Organisation - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know.
Hi @eddiejaoude and @dan-mba. I see that map.js, statistic.js and search.js files need to be replaced with function calls. I'm open to take this up :).
Hi @eddiejaoude and @dan-mba. I see that map.js, statistic.js and search.js files need to be replaced with function calls. I'm open to take this up :).
@Harrish-Selvarajah Sorry I missed your comment. Work got stalled on this issue by the migration of loading profiles from the database. Then got combined with fixing some performance issues. Since there is only one file left, I will handle it to get this issue closed. Again, I apologize for not responding sooner.
Hey @dan-mba, No worries! 😀
All pages are migrated