From fd13d59451ae016f75a5ea5cb798563882a08eb1 Mon Sep 17 00:00:00 2001 From: Ben Liu Date: Thu, 2 Nov 2023 17:57:30 +0700 Subject: [PATCH] fix(homepage): component files should not be in page folder --- homepage/src/{pages/admin => CMS}/DecapCms.jsx | 0 homepage/src/{pages/admin => CMS}/config.json | 0 homepage/src/{pages/admin => CMS}/preview/CardPreview.jsx | 4 ++-- homepage/src/{pages/admin => CMS}/preview/FooterPreview.jsx | 2 +- homepage/src/{pages/admin => CMS}/preview/PagePreview.jsx | 4 ++-- homepage/src/pages/admin/index.jsx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename homepage/src/{pages/admin => CMS}/DecapCms.jsx (100%) rename homepage/src/{pages/admin => CMS}/config.json (100%) rename homepage/src/{pages/admin => CMS}/preview/CardPreview.jsx (78%) rename homepage/src/{pages/admin => CMS}/preview/FooterPreview.jsx (85%) rename homepage/src/{pages/admin => CMS}/preview/PagePreview.jsx (76%) diff --git a/homepage/src/pages/admin/DecapCms.jsx b/homepage/src/CMS/DecapCms.jsx similarity index 100% rename from homepage/src/pages/admin/DecapCms.jsx rename to homepage/src/CMS/DecapCms.jsx diff --git a/homepage/src/pages/admin/config.json b/homepage/src/CMS/config.json similarity index 100% rename from homepage/src/pages/admin/config.json rename to homepage/src/CMS/config.json diff --git a/homepage/src/pages/admin/preview/CardPreview.jsx b/homepage/src/CMS/preview/CardPreview.jsx similarity index 78% rename from homepage/src/pages/admin/preview/CardPreview.jsx rename to homepage/src/CMS/preview/CardPreview.jsx index 593dde80..2c3f418f 100644 --- a/homepage/src/pages/admin/preview/CardPreview.jsx +++ b/homepage/src/CMS/preview/CardPreview.jsx @@ -1,5 +1,5 @@ -import Card from '../../../components/cards/card'; -import { processCard } from '../../../lib/processCard'; +import Card from '../../components/cards/card'; +import { processCard } from '../../lib/processCard'; const CardPreview = ({ entry, getAsset, assetsByLocale }) => { const locale = 'en'; diff --git a/homepage/src/pages/admin/preview/FooterPreview.jsx b/homepage/src/CMS/preview/FooterPreview.jsx similarity index 85% rename from homepage/src/pages/admin/preview/FooterPreview.jsx rename to homepage/src/CMS/preview/FooterPreview.jsx index c88a81a3..b798d968 100644 --- a/homepage/src/pages/admin/preview/FooterPreview.jsx +++ b/homepage/src/CMS/preview/FooterPreview.jsx @@ -1,4 +1,4 @@ -import FooterLinks from '../../../layouts/footer/footerLinks'; +import FooterLinks from '../../layouts/footer/footerLinks'; const FooterPreview = ({ entry }) => { const footer = entry.getIn(['data', 'footer']); diff --git a/homepage/src/pages/admin/preview/PagePreview.jsx b/homepage/src/CMS/preview/PagePreview.jsx similarity index 76% rename from homepage/src/pages/admin/preview/PagePreview.jsx rename to homepage/src/CMS/preview/PagePreview.jsx index 3cc57d89..45d3c313 100644 --- a/homepage/src/pages/admin/preview/PagePreview.jsx +++ b/homepage/src/CMS/preview/PagePreview.jsx @@ -1,5 +1,5 @@ -import { componentMapper } from '../../../lib/componentMapper'; -import contentMapper from '../../../layouts/contentMapper'; +import { componentMapper } from '../../lib/componentMapper'; +import contentMapper from '../../layouts/contentMapper'; const PagePreview = ({ entry, assetsByLocale }) => { const locale = 'en'; diff --git a/homepage/src/pages/admin/index.jsx b/homepage/src/pages/admin/index.jsx index 6dcd2d62..44d8b1e1 100644 --- a/homepage/src/pages/admin/index.jsx +++ b/homepage/src/pages/admin/index.jsx @@ -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 '../../CMS/DecapCms'; /** *