Next Js dynamically change template layout for page data created in Strapi

  javascript, next.js, reactjs, strapi

The goal:
We have a home page called:
and the homepage has pages called about us, about company, contact us and services respectively which are all stored inside Strapi

The front-end design is done in nextjs and there are two template layouts created called template1.js and template2.js.

The goal here is that a content manager (CM) working on Strapi should be able to pick any template and render the json data from strapi using the template that was selected by the CM.

Source: Ask Javascript Questions