Skip to content

Commit

Permalink
fix: change export to default export
Browse files Browse the repository at this point in the history
  • Loading branch information
ljc1991 committed Nov 2, 2023
1 parent a873480 commit 6924fdf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
10 changes: 6 additions & 4 deletions homepage/src/pages/admin/DecapCms.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import dynamic from 'next/dynamic';
import { PagePreview } from './preview/PagePreview';
import { FooterPreview } from './preview/FooterPreview';
import { CardPreview } from './preview/CardPreview';
import PagePreview from './preview/PagePreview';
import FooterPreview from './preview/FooterPreview';
import CardPreview from './preview/CardPreview';

import config from './config.json';

Expand All @@ -13,7 +13,7 @@ const withAssetsByLocale = (Component, assetsByLocale) => {
return WrappedComponent;
};

export const DecapCms = (assetsByLocale) =>
const DecapCms = (assetsByLocale) =>
dynamic(
() =>
import('decap-cms-app').then((cms) => {
Expand Down Expand Up @@ -47,3 +47,5 @@ export const DecapCms = (assetsByLocale) =>
}),
{ ssr: false, loading: () => <p>Loading...</p> },
);

export default DecapCms;
2 changes: 1 addition & 1 deletion homepage/src/pages/admin/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Script from 'next/script';

import { fetchCards } from '../../lib/fetchCards';
import { processCard } from '../../lib/processCard';
import { DecapCms } from './DecapCms';
import DecapCms from './DecapCms';

/**
*
Expand Down
4 changes: 3 additions & 1 deletion homepage/src/pages/admin/preview/CardPreview.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Card from '../../../components/cards/card';
import { processCard } from '../../../lib/processCard';

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

Expand All @@ -14,3 +14,5 @@ export const CardPreview = ({ entry, getAsset, assetsByLocale }) => {

return <Card card={card} />;
};

export default CardPreview;
4 changes: 3 additions & 1 deletion homepage/src/pages/admin/preview/FooterPreview.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import FooterLinks from '../../../layouts/footer/footerLinks';

export const FooterPreview = ({ entry }) => {
const FooterPreview = ({ entry }) => {
const footer = entry.getIn(['data', 'footer']);
const links = footer
?.get('links')
Expand All @@ -13,3 +13,5 @@ export const FooterPreview = ({ entry }) => {
.toArray();
return <FooterLinks links={links} />;
};

export default FooterPreview;
4 changes: 3 additions & 1 deletion homepage/src/pages/admin/preview/PagePreview.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { componentMapper } from '../../../lib/componentMapper';
import contentMapper from '../../../layouts/contentMapper';

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

Expand All @@ -12,3 +12,5 @@ export const PagePreview = ({ entry, assetsByLocale }) => {
});
return <div>{sections}</div>;
};

export default PagePreview;

0 comments on commit 6924fdf

Please sign in to comment.