diff --git a/packages/samples/headless-ssr-commerce/app/search/page.tsx b/packages/samples/headless-ssr-commerce/app/search/page.tsx index ba666fa4e26..ff982368372 100644 --- a/packages/samples/headless-ssr-commerce/app/search/page.tsx +++ b/packages/samples/headless-ssr-commerce/app/search/page.tsx @@ -19,7 +19,6 @@ export default async function Search() { const navigatorContext = new NextJsNavigatorContext(headers()); searchEngineDefinition.setNavigatorContextProvider(() => navigatorContext); - const context = await getContext(); // Fetches the cart items from an external service const items = await externalCartAPI.getCart(); diff --git a/packages/samples/headless-ssr-commerce/components/providers/listing-provider.tsx b/packages/samples/headless-ssr-commerce/components/providers/listing-provider.tsx index f990fc5bb35..d0112efb942 100644 --- a/packages/samples/headless-ssr-commerce/components/providers/listing-provider.tsx +++ b/packages/samples/headless-ssr-commerce/components/providers/listing-provider.tsx @@ -5,10 +5,7 @@ import { ListingHydratedState, ListingStaticState, } from '@/lib/commerce-engine'; -import { - loadSearchActions, - NavigatorContext, -} from '@coveo/headless-react/ssr-commerce'; +import {NavigatorContext} from '@coveo/headless-react/ssr-commerce'; import {PropsWithChildren, useEffect, useState} from 'react'; interface ListingPageProps { @@ -41,9 +38,6 @@ export default function ListingProvider({ }) .then(({engine, controllers}) => { setHydratedState({engine, controllers}); - engine.addReducers({}); - const {executeSearch} = loadSearchActions(engine); - engine.dispatch(executeSearch()); // Refreshing recommendations in the browser after hydrating the state in the client-side // Recommendation refresh in the server is not supported yet. // controllers.popularBoughtRecs.refresh(); // FIXME: does not work