diff --git a/packages/core/src/components/entry-editor/EditorInterface.tsx b/packages/core/src/components/entry-editor/EditorInterface.tsx index a60a4274..e2159bb1 100644 --- a/packages/core/src/components/entry-editor/EditorInterface.tsx +++ b/packages/core/src/components/entry-editor/EditorInterface.tsx @@ -4,7 +4,7 @@ import { ScrollSyncPane } from 'react-scroll-sync'; import { EDITOR_SIZE_COMPACT } from '@staticcms/core/constants/views'; import { summaryFormatter } from '@staticcms/core/lib/formatters'; import useBreadcrumbs from '@staticcms/core/lib/hooks/useBreadcrumbs'; -import { getI18nInfo, hasI18n } from '@staticcms/core/lib/i18n'; +import { getI18nInfo, getPreviewEntry, hasI18n } from '@staticcms/core/lib/i18n'; import classNames from '@staticcms/core/lib/util/classNames.util'; import { getFileFromSlug, @@ -305,6 +305,10 @@ const EditorInterface = ({ [collection, entry, fields, fieldsErrors, handleLocaleChange, selectedLocale, submitted, t], ); + const previewEntry = collectHasI18n + ? getPreviewEntry(entry, selectedLocale, defaultLocale) + : entry; + const mobileLocaleEditor = useMemo( () => (