@@ -23,12 +23,12 @@ The following pages now support Makeswift SEO metadata:
2323
2424## Migration steps
2525
26- ### Step 1: Add ` getPageMetadata ` function
26+ ### Step 1: Add ` getMakeswiftPageMetadata ` function
2727
28- Add the ` getPageMetadata ` function to ` core/lib/makeswift/client.ts ` :
28+ Add the ` getMakeswiftPageMetadata ` function to ` core/lib/makeswift/client.ts ` :
2929
3030``` diff
31- + export async function getPageMetadata ({ path, locale }: { path: string; locale: string }) {
31+ + export async function getMakeswiftPageMetadata ({ path, locale }: { path: string; locale: string }) {
3232+ const snapshot = await getPageSnapshot({ path, locale });
3333+
3434+ if (snapshot == null) {
@@ -49,7 +49,7 @@ Export the function from `core/lib/makeswift/index.ts`:
4949``` diff
5050 export { Page } from './page';
5151- export { client } from './client';
52- + export { client, getPageMetadata } from './client';
52+ + export { client, getMakeswiftPageMetadata } from './client';
5353```
5454
5555### Step 2: Update page metadata
@@ -60,7 +60,7 @@ Update `core/app/[locale]/(default)/cart/page.tsx`:
6060
6161``` diff
6262 import { getPreferredCurrencyCode } from '~/lib/currency';
63- + import { getPageMetadata } from '~/lib/makeswift';
63+ + import { getMakeswiftPageMetadata } from '~/lib/makeswift';
6464 import { Slot } from '~/lib/makeswift/slot';
6565```
6666
@@ -69,7 +69,7 @@ Update `core/app/[locale]/(default)/cart/page.tsx`:
6969 const { locale } = await params;
7070
7171 const t = await getTranslations({ locale, namespace: 'Cart' });
72- + const makeswiftMetadata = await getPageMetadata ({ path: '/cart', locale });
72+ + const makeswiftMetadata = await getMakeswiftPageMetadata ({ path: '/cart', locale });
7373
7474 return {
7575- title: t('title'),
0 commit comments