Skip to content

Commit

Permalink
refactor(homepage): align cms preview component locale from editing l…
Browse files Browse the repository at this point in the history
…ocale
  • Loading branch information
ben196888 committed Nov 2, 2023
1 parent e4b2b28 commit 76df822
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions homepage/src/CMS/preview/CardPreview.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import Card from '../../components/cards/card';
import { processCard } from '../../lib/processCard';

const CardPreview = ({ entry, getAsset, assetsByLocale }) => {
const locale = 'en';
const CardPreview = ({ entry, getAsset, assetsByLocale, locale }) => {
const assets = assetsByLocale[locale];

const data = entry.getIn(['data']).toJS();
Expand Down
3 changes: 1 addition & 2 deletions homepage/src/CMS/preview/PagePreview.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { componentMapper } from '../../lib/componentMapper';
import contentMapper from '../../layouts/contentMapper';

const PagePreview = ({ entry, assetsByLocale }) => {
const locale = 'en';
const PagePreview = ({ entry, assetsByLocale, locale }) => {
const assets = assetsByLocale[locale];

const layoutList = entry.getIn(['data', 'layout_list']);
Expand Down

0 comments on commit 76df822

Please sign in to comment.