I am currently in the process of setting up a blog using Next.js and GraphCMS. I have an ArticleList component that I want to display on multiple pages, such as my homepage and under each article as a recommendation.
Since the article list is sourced from my CMS, I am utilizing getStaticProps. However, given that getStaticProps cannot be used at the component level, I find myself duplicating the same function on every page. Is there a more efficient way for me to reuse this code and apply it across different pages?
I would appreciate any insights or best practices you may have regarding this matter.