diff --git a/codux.config.json b/codux.config.json index f0f4107..0164537 100644 --- a/codux.config.json +++ b/codux.config.json @@ -7,10 +7,33 @@ }, "newComponent": { "componentsPath": "src/components", - "templatesPath": "src/_codux/component-templates" + "templatesPath": "src/_codux/component-templates", + "templatesConfig": { + "page": { + "path": "src/pages", + "boardTemplate": "2-page-fake-data" + } + } }, "newBoard": { - "templatesPath": "src/_codux/board-templates" + "templatesPath": "src/_codux/board-templates", + "templatesConfig": { + "5-documentation": { + "path": "src/_codux/boards/documentation" + }, + "1-component-with-data": { + "path": "src/_codux/boards/components" + }, + "4-component-empty": { + "path": "src/_codux/boards/components" + }, + "2-page-fake-data": { + "path": "src/_codux/boards/pages" + }, + "3-page-real-data": { + "path": "src/_codux/boards/pages" + } + } }, "safeRender": { "maxInstancesPerComponent": 1000 diff --git a/src/_codux/board-wrappers/page-wrapper.tsx b/src/_codux/board-wrappers/page-wrapper.tsx index a31f8df..c7b92b5 100644 --- a/src/_codux/board-wrappers/page-wrapper.tsx +++ b/src/_codux/board-wrappers/page-wrapper.tsx @@ -10,8 +10,9 @@ import { CartOpenContextProvider } from '/src/components/cart/cart-open-context' type Props = { children: React.ReactNode; /** @important */ - settings?: FakeDataSettings; path?: string; + /** @important */ + settings?: FakeDataSettings; }; export function PageWrapper(props: Props) { diff --git a/src/_codux/boards/pages/thank-you-page/page-thank-you.board.tsx b/src/_codux/boards/pages/thank-you-page/page-thank-you.board.tsx index 1267bfa..aa4ff01 100644 --- a/src/_codux/boards/pages/thank-you-page/page-thank-you.board.tsx +++ b/src/_codux/boards/pages/thank-you-page/page-thank-you.board.tsx @@ -1,4 +1,4 @@ -import { ThankYouPage } from '../../../../components/thank-you-page/thank-you-page'; +import { ThankYouPage } from '../../../../pages/thank-you-page/thank-you-page'; import { ContentSlot, createBoard } from '@wixc3/react-board'; import { PageWrapper } from '/src/_codux/board-wrappers/page-wrapper'; diff --git a/src/_codux/component-templates/page/new-component.module.scss b/src/_codux/component-templates/page/new-component.module.scss new file mode 100644 index 0000000..5e0f394 --- /dev/null +++ b/src/_codux/component-templates/page/new-component.module.scss @@ -0,0 +1,4 @@ +@import '@styles/theme.module.scss'; + +.root { +} diff --git a/src/_codux/component-templates/page/new-component.tsx b/src/_codux/component-templates/page/new-component.tsx new file mode 100644 index 0000000..379f10d --- /dev/null +++ b/src/_codux/component-templates/page/new-component.tsx @@ -0,0 +1,6 @@ +import styles from './new-component.module.scss'; +import commonStyles from '@styles/common-styles.module.scss'; + +export const NewComponent = () => { + return
diff --git a/src/pages/home-page/home-page.tsx b/src/pages/home-page/home-page.tsx index 274227d..d046f48 100644 --- a/src/pages/home-page/home-page.tsx +++ b/src/pages/home-page/home-page.tsx @@ -1,4 +1,3 @@ -import classNames from 'classnames'; import styles from './home-page.module.scss'; import { HeroImage } from './hero-image/hero-image'; import { ROUTES } from '../../router/config'; @@ -6,17 +5,13 @@ import { Link, useNavigate } from 'react-router-dom'; import { ProductCard } from '../../components/product-card/product-card'; import { usePromotedProducts } from '../../api/api-hooks'; -export interface HomePageProps { - className?: string; -} - -export const HomePage = ({ className }: HomePageProps) => { +export const HomePage = () => { const navigate = useNavigate(); const { data: products } = usePromotedProducts(); return ( -
diff --git a/src/router/routes.tsx b/src/router/routes.tsx index 7461b83..ac33e15 100644 --- a/src/router/routes.tsx +++ b/src/router/routes.tsx @@ -5,7 +5,7 @@ import { AboutPage } from '../pages/about-page/about-page'; import { ROUTES } from './config'; import { ProductDetailsPage } from '../pages/product-details-page/product-details-page'; import { ProductsPage } from '../pages/products-page/products-page'; -import { ThankYouPage } from '../components/thank-you-page/thank-you-page'; +import { ThankYouPage } from '../pages/thank-you-page/thank-you-page'; export const getRoutes: () => RouteObject[] = () => [ {