On a personal project related to an online shopping website I have a list of the products page, I'm trying that after I delete a product to refetch the products. I'm using Next.JS and Firebase as a database. The first time when the page is loaded I'm getting the products with getStaticProps
export const getStaticProps = async (context) => {
const items = Array.from(await getItems({shouldShuffle: false}));
// more code + return items
}
How can I recall the items var after deleting a product to refetch items?