Skip to content

Commit

Permalink
rename export
Browse files Browse the repository at this point in the history
  • Loading branch information
y-lakhdar committed Aug 28, 2024
1 parent 3ff170f commit dac7ff1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {headers} from 'next/headers';
import Recommendation from '../_components/pages/recommendation';
import {recommendationEngineDefinition} from '../_lib/commerce-engine';
import {standaloneEngineDefinition} from '../_lib/commerce-engine';
import {NextJsNavigatorContext} from '../_lib/navigatorContextProvider';

/**
Expand All @@ -11,12 +11,12 @@ import {NextJsNavigatorContext} from '../_lib/navigatorContextProvider';
export default async function RecommendationPage() {
// Sets the navigator context provider to use the newly created `navigatorContext` before fetching the app static state
const navigatorContext = new NextJsNavigatorContext(headers());
recommendationEngineDefinition.setNavigatorContextProvider(
standaloneEngineDefinition.setNavigatorContextProvider(
() => navigatorContext
);

// Fetches the static state of the app with initial state (when applicable)
const staticState = await recommendationEngineDefinition.fetchStaticState();
const staticState = await standaloneEngineDefinition.fetchStaticState();

return (
<Recommendation
Expand Down

0 comments on commit dac7ff1

Please sign in to comment.