diff --git a/payload.config.ts b/payload.config.ts index 65cade6..baeb86a 100644 --- a/payload.config.ts +++ b/payload.config.ts @@ -43,7 +43,7 @@ export default buildConfig({ }, livePreview: { url: ({ data, locale, collectionConfig }) => - `${process.env.BASE_URL}/${collectionConfig?.slug || ''}/preview${data.path}${ + `${collectionConfig?.slug || ''}/preview${data.path}${ locale ? `?locale=${locale.code}` : '' }`, collections: [COLLECTION_SLUG_PAGE, COLLECTION_SLUG_POST],