If you don't want to use the Enrich Review Widget view provided by Cloutly. You can design the review widgets yourself.
Here is a quick example of a DIY solution for review widgets using React.
Notice how you still perform an API call to the Aggreation API and display them however you would like on your site.
React.js
import React from'react'constSupplierPage= () => {const [reviews,setReviews] =React.useState([]);React.useEffect(() => {// ** 1// This call is your backend endpoint which pulls reviews // from Cloutly API for the given vendor ID.getReviewsForSupplier("VENDOR_ID", options).then((data) =>setReviews(data)); }, []);// ** 2// You can display reviews however you like using your own componentsreturn ( <div> MY Supplier {reviews && <CustomReviewComponentreviews={reviews}/>} </div> );}constMyApp= () => {return ( <MainApp> <head> <title>Your Marketplace Website</title> </head> <SupplierPage /> </MainApp> );};
Next.js
Example: Use getServerSideProps to render review data server-side dynamically.
import React from'react'functionPage({ data }) {// Render review data...}// This gets called on every requestexportasyncfunctiongetServerSideProps(context) {const { id } =context.params; // Get Supplier ID from slug `/vendor/1`// Fetch data from Cloutly APIconstreviews=awaitfetchReviews(id);// Pass data to the page via propsreturn { props: { data: reviews } }}exportdefault Page