diff --git a/src/_codux/board-templates/1-component-with-data.board.tsx b/_codux/board-templates/1-component-with-data.board.tsx
similarity index 100%
rename from src/_codux/board-templates/1-component-with-data.board.tsx
rename to _codux/board-templates/1-component-with-data.board.tsx
diff --git a/src/_codux/board-templates/2-page-fake-data.board.tsx b/_codux/board-templates/2-page-fake-data.board.tsx
similarity index 100%
rename from src/_codux/board-templates/2-page-fake-data.board.tsx
rename to _codux/board-templates/2-page-fake-data.board.tsx
diff --git a/src/_codux/board-templates/3-page-real-data.board.tsx b/_codux/board-templates/3-page-real-data.board.tsx
similarity index 100%
rename from src/_codux/board-templates/3-page-real-data.board.tsx
rename to _codux/board-templates/3-page-real-data.board.tsx
diff --git a/src/_codux/board-templates/4-component-empty.board.tsx b/_codux/board-templates/4-component-empty.board.tsx
similarity index 100%
rename from src/_codux/board-templates/4-component-empty.board.tsx
rename to _codux/board-templates/4-component-empty.board.tsx
diff --git a/src/_codux/board-templates/5-documentation/new-board.board.tsx b/_codux/board-templates/5-documentation/new-board.board.tsx
similarity index 100%
rename from src/_codux/board-templates/5-documentation/new-board.board.tsx
rename to _codux/board-templates/5-documentation/new-board.board.tsx
diff --git a/src/_codux/board-templates/5-documentation/new-board.module.scss b/_codux/board-templates/5-documentation/new-board.module.scss
similarity index 100%
rename from src/_codux/board-templates/5-documentation/new-board.module.scss
rename to _codux/board-templates/5-documentation/new-board.module.scss
diff --git a/src/_codux/board-wrappers/component-wrapper.tsx b/_codux/board-wrappers/component-wrapper.tsx
similarity index 100%
rename from src/_codux/board-wrappers/component-wrapper.tsx
rename to _codux/board-wrappers/component-wrapper.tsx
diff --git a/src/_codux/board-wrappers/page-wrapper-real-data.tsx b/_codux/board-wrappers/page-wrapper-real-data.tsx
similarity index 79%
rename from src/_codux/board-wrappers/page-wrapper-real-data.tsx
rename to _codux/board-wrappers/page-wrapper-real-data.tsx
index 947528c..7a07e05 100644
--- a/src/_codux/board-wrappers/page-wrapper-real-data.tsx
+++ b/_codux/board-wrappers/page-wrapper-real-data.tsx
@@ -1,7 +1,8 @@
import { RouterProvider, createMemoryRouter } from 'react-router-dom';
-import { WixAPIContextProvider } from '../../api/wix-api-context-provider';
-import { getRoutes } from '../../router/routes';
+import { WixAPIContextProvider } from '../../src/api/wix-api-context-provider';
+import { getRoutes } from '../../src/router/routes';
import { replaceRouteWithChildren } from './set-children-to-route';
+import React from 'react';
type Props = {
children?: React.ReactNode;
diff --git a/src/_codux/board-wrappers/page-wrapper.tsx b/_codux/board-wrappers/page-wrapper.tsx
similarity index 94%
rename from src/_codux/board-wrappers/page-wrapper.tsx
rename to _codux/board-wrappers/page-wrapper.tsx
index a3c2f57..4fc0fe2 100644
--- a/src/_codux/board-wrappers/page-wrapper.tsx
+++ b/_codux/board-wrappers/page-wrapper.tsx
@@ -3,7 +3,7 @@ import {
FakeWixAPIContextProvider,
FakeDataSettings,
} from '../fake-data/fake-wix-api-context-provider';
-import { getRoutes } from '../../router/routes';
+import { getRoutes } from '~/router/routes';
import { replaceRouteWithChildren } from './set-children-to-route';
type Props = {
diff --git a/src/_codux/board-wrappers/set-children-to-route.ts b/_codux/board-wrappers/set-children-to-route.ts
similarity index 100%
rename from src/_codux/board-wrappers/set-children-to-route.ts
rename to _codux/board-wrappers/set-children-to-route.ts
diff --git a/src/_codux/board-wrappers/wait-for-helpers.ts b/_codux/board-wrappers/wait-for-helpers.ts
similarity index 100%
rename from src/_codux/board-wrappers/wait-for-helpers.ts
rename to _codux/board-wrappers/wait-for-helpers.ts
diff --git a/src/_codux/boards-global-setup.ts b/_codux/boards-global-setup.ts
similarity index 88%
rename from src/_codux/boards-global-setup.ts
rename to _codux/boards-global-setup.ts
index d6e463a..7fd261e 100644
--- a/src/_codux/boards-global-setup.ts
+++ b/_codux/boards-global-setup.ts
@@ -1,4 +1,4 @@
-import '../styles/index.module.scss';
+import '@styles/index.module.scss';
//@ts-ignore
import env from 'raw-loader!/.env';
const lines = env.split('\n');
diff --git a/src/_codux/boards/app.board.tsx b/_codux/boards/app.board.tsx
similarity index 100%
rename from src/_codux/boards/app.board.tsx
rename to _codux/boards/app.board.tsx
diff --git a/src/_codux/boards/calendar/calendar.board.tsx b/_codux/boards/calendar/calendar.board.tsx
similarity index 73%
rename from src/_codux/boards/calendar/calendar.board.tsx
rename to _codux/boards/calendar/calendar.board.tsx
index cf6c1d9..20bfcf5 100644
--- a/src/_codux/boards/calendar/calendar.board.tsx
+++ b/_codux/boards/calendar/calendar.board.tsx
@@ -1,8 +1,6 @@
-import { Calendar } from '../../../components/calendar/calendar';
-import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { PageWrapper } from '/src/_codux/board-wrappers/page-wrapper';
+import { Calendar } from '~/components/calendar/calendar';
+import { createBoard } from '@wixc3/react-board';
import { useState } from 'react';
-import { format } from 'date-fns';
export default createBoard({
name: 'Calendar',
diff --git a/src/_codux/boards/checkout/checkout.board.tsx b/_codux/boards/checkout/checkout.board.tsx
similarity index 51%
rename from src/_codux/boards/checkout/checkout.board.tsx
rename to _codux/boards/checkout/checkout.board.tsx
index f3fdf37..786be5c 100644
--- a/src/_codux/boards/checkout/checkout.board.tsx
+++ b/_codux/boards/checkout/checkout.board.tsx
@@ -1,6 +1,6 @@
-import { Checkout } from '../../../components/checkout/checkout';
+import { Checkout } from '~/components/checkout/checkout';
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { ComponentWrapper } from '/src/_codux/board-wrappers/component-wrapper';
+import { ComponentWrapper } from '../../board-wrappers/component-wrapper';
export default createBoard({
name: 'Checkout',
@@ -11,8 +11,4 @@ export default createBoard({
),
- isSnippet: true,
- environmentProps: {
- canvasMargin: { right: 0, bottom: 0, left: 0, top: 0 },
- },
});
diff --git a/src/_codux/boards/components/dropdown-menu/dropdown-menu.board.tsx b/_codux/boards/components/dropdown-menu/dropdown-menu.board.tsx
similarity index 84%
rename from src/_codux/boards/components/dropdown-menu/dropdown-menu.board.tsx
rename to _codux/boards/components/dropdown-menu/dropdown-menu.board.tsx
index f482ad9..eb5b46b 100644
--- a/src/_codux/boards/components/dropdown-menu/dropdown-menu.board.tsx
+++ b/_codux/boards/components/dropdown-menu/dropdown-menu.board.tsx
@@ -1,5 +1,5 @@
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { DropdownMenu } from '../../../../components/dropdown-menu/dropdown-menu';
+import { DropdownMenu } from '~/components/dropdown-menu/dropdown-menu';
import { ComponentWrapper } from '../../../board-wrappers/component-wrapper';
export default createBoard({
@@ -35,9 +35,4 @@ export default createBoard({
),
- isSnippet: true,
- environmentProps: {
- canvasMargin: { right: 0, bottom: 0, left: 0, top: 0 },
- windowWidth: 300,
- },
});
diff --git a/_codux/boards/components/footer/footer.board.tsx b/_codux/boards/components/footer/footer.board.tsx
new file mode 100644
index 0000000..ddab272
--- /dev/null
+++ b/_codux/boards/components/footer/footer.board.tsx
@@ -0,0 +1,11 @@
+import { Footer } from '~/components/site-footer/site-footer';
+import { ContentSlot, createBoard } from '@wixc3/react-board';
+
+export default createBoard({
+ name: 'Footer',
+ Board: () => (
+
+
+
+ )
+});
diff --git a/_codux/boards/components/header/header.board.tsx b/_codux/boards/components/header/header.board.tsx
new file mode 100644
index 0000000..0c975b2
--- /dev/null
+++ b/_codux/boards/components/header/header.board.tsx
@@ -0,0 +1,14 @@
+import { Header } from '~/components/header/header';
+import { ContentSlot, createBoard } from '@wixc3/react-board';
+import { ComponentWrapper } from '../../../board-wrappers/component-wrapper';
+
+export default createBoard({
+ name: 'Header',
+ Board: () => (
+
+
+
+
+
+ ),
+});
diff --git a/src/_codux/boards/components/hero-image/hero-image.board.tsx b/_codux/boards/components/hero-image/hero-image.board.tsx
similarity index 80%
rename from src/_codux/boards/components/hero-image/hero-image.board.tsx
rename to _codux/boards/components/hero-image/hero-image.board.tsx
index 6b77c3a..01b474a 100644
--- a/src/_codux/boards/components/hero-image/hero-image.board.tsx
+++ b/_codux/boards/components/hero-image/hero-image.board.tsx
@@ -1,4 +1,4 @@
-import { HeroImage } from '../../../../pages/home-page/hero-image/hero-image';
+import { HeroImage } from '~/pages/home-page/hero-image/hero-image';
import { ContentSlot, createBoard } from '@wixc3/react-board';
export default createBoard({
@@ -13,5 +13,4 @@ export default createBoard({
/>
),
- isSnippet: true,
});
diff --git a/src/_codux/boards/customer-details-preview/customer-details-preview.board.tsx b/_codux/boards/customer-details-preview/customer-details-preview.board.tsx
similarity index 61%
rename from src/_codux/boards/customer-details-preview/customer-details-preview.board.tsx
rename to _codux/boards/customer-details-preview/customer-details-preview.board.tsx
index 80d9d34..df5eddc 100644
--- a/src/_codux/boards/customer-details-preview/customer-details-preview.board.tsx
+++ b/_codux/boards/customer-details-preview/customer-details-preview.board.tsx
@@ -1,6 +1,6 @@
-import { CustomerDetailsPreview } from '../../../components/customer-details-preview/customer-details-preview';
+import { CustomerDetailsPreview } from '~/components/customer-details-preview/customer-details-preview';
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { ComponentWrapper } from '/src/_codux/board-wrappers/component-wrapper';
+import { ComponentWrapper } from '../../board-wrappers/component-wrapper';
export default createBoard({
name: 'CustomerDetailsPreview',
@@ -16,8 +16,4 @@ export default createBoard({
),
- isSnippet: true,
- environmentProps: {
- canvasMargin: { right: 0, bottom: 0, left: 0, top: 0 },
- },
});
diff --git a/src/_codux/boards/documentation/common-styles.board.tsx b/_codux/boards/documentation/common-styles.board.tsx
similarity index 73%
rename from src/_codux/boards/documentation/common-styles.board.tsx
rename to _codux/boards/documentation/common-styles.board.tsx
index 196b906..844e2e6 100644
--- a/src/_codux/boards/documentation/common-styles.board.tsx
+++ b/_codux/boards/documentation/common-styles.board.tsx
@@ -1,5 +1,5 @@
import { createBoard } from '@wixc3/react-board';
-import commonStyles from '../../../styles/common-styles.module.scss';
+import commonStyles from '~/styles/common-styles.module.scss';
import boardStyle from './documentation.module.scss';
export default createBoard({
@@ -17,13 +17,4 @@ export default createBoard({
),
isSnippet: false,
- environmentProps: {
- canvasHeight: 52,
- canvasMargin: {
- top: 0,
- left: 0,
- bottom: 0,
- right: 0,
- },
- },
});
diff --git a/src/_codux/boards/documentation/documentation.module.scss b/_codux/boards/documentation/documentation.module.scss
similarity index 100%
rename from src/_codux/boards/documentation/documentation.module.scss
rename to _codux/boards/documentation/documentation.module.scss
diff --git a/src/_codux/boards/documentation/style-guide.board.module.scss b/_codux/boards/documentation/style-guide.board.module.scss
similarity index 98%
rename from src/_codux/boards/documentation/style-guide.board.module.scss
rename to _codux/boards/documentation/style-guide.board.module.scss
index b53ee00..f77a979 100644
--- a/src/_codux/boards/documentation/style-guide.board.module.scss
+++ b/_codux/boards/documentation/style-guide.board.module.scss
@@ -1,4 +1,4 @@
-@import '../../../styles/theme.module.scss';
+@import '@styles/theme.module.scss';
.root {
}
diff --git a/src/_codux/boards/documentation/vars-classes.module.scss b/_codux/boards/documentation/vars-classes.module.scss
similarity index 100%
rename from src/_codux/boards/documentation/vars-classes.module.scss
rename to _codux/boards/documentation/vars-classes.module.scss
diff --git a/src/_codux/boards/hour-buttons/hour-buttons.board.tsx b/_codux/boards/hour-buttons/hour-buttons.board.tsx
similarity index 79%
rename from src/_codux/boards/hour-buttons/hour-buttons.board.tsx
rename to _codux/boards/hour-buttons/hour-buttons.board.tsx
index 1a9ce87..d0fea96 100644
--- a/src/_codux/boards/hour-buttons/hour-buttons.board.tsx
+++ b/_codux/boards/hour-buttons/hour-buttons.board.tsx
@@ -1,6 +1,6 @@
-import { HourButtons } from '../../../components/hour-buttons/hour-buttons';
+import { HourButtons } from '~/components/hour-buttons/hour-buttons';
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { ComponentWrapper } from '/src/_codux/board-wrappers/component-wrapper';
+import { ComponentWrapper } from '../../board-wrappers/component-wrapper';
import React, { useState } from 'react';
export default createBoard({
diff --git a/src/_codux/boards/intro/intro.board.tsx b/_codux/boards/intro/intro.board.tsx
similarity index 93%
rename from src/_codux/boards/intro/intro.board.tsx
rename to _codux/boards/intro/intro.board.tsx
index 8522c7c..b6b5c7d 100644
--- a/src/_codux/boards/intro/intro.board.tsx
+++ b/_codux/boards/intro/intro.board.tsx
@@ -1,7 +1,7 @@
import { createBoard } from '@wixc3/react-board';
import styles from './intro.module.scss';
import Classnames from 'classnames';
-import CommonStyles_module from '../../../styles/common-styles.module.scss';
+// import CommonStyles_module from '~/styles/common-styles.module.scss';
export default createBoard({
name: '🌱 Intro',
diff --git a/src/_codux/boards/intro/intro.module.scss b/_codux/boards/intro/intro.module.scss
similarity index 100%
rename from src/_codux/boards/intro/intro.module.scss
rename to _codux/boards/intro/intro.module.scss
diff --git a/src/_codux/boards/lesson-item/lesson-item-mobile-view.board.tsx b/_codux/boards/lesson-item/lesson-item-mobile-view.board.tsx
similarity index 62%
rename from src/_codux/boards/lesson-item/lesson-item-mobile-view.board.tsx
rename to _codux/boards/lesson-item/lesson-item-mobile-view.board.tsx
index efdffe4..c8c9c6f 100644
--- a/src/_codux/boards/lesson-item/lesson-item-mobile-view.board.tsx
+++ b/_codux/boards/lesson-item/lesson-item-mobile-view.board.tsx
@@ -1,4 +1,4 @@
-import { LessonItem } from '../../../components/lesson-item/lesson-item';
+import { LessonItem } from '~/components/lesson-item/lesson-item';
import { ContentSlot, createBoard } from '@wixc3/react-board';
import { ComponentWrapper } from '../../board-wrappers/component-wrapper';
@@ -11,10 +11,4 @@ export default createBoard({
),
- isSnippet: true,
- environmentProps: {
- canvasMargin: { right: 0, bottom: 0, left: 0, top: 0 },
- windowWidth: 412,
- windowHeight: 915,
- },
});
diff --git a/src/_codux/boards/lesson-item/lesson-item.board.tsx b/_codux/boards/lesson-item/lesson-item.board.tsx
similarity index 62%
rename from src/_codux/boards/lesson-item/lesson-item.board.tsx
rename to _codux/boards/lesson-item/lesson-item.board.tsx
index b9c5314..106768d 100644
--- a/src/_codux/boards/lesson-item/lesson-item.board.tsx
+++ b/_codux/boards/lesson-item/lesson-item.board.tsx
@@ -1,4 +1,4 @@
-import { LessonItem } from '../../../components/lesson-item/lesson-item';
+import { LessonItem } from '~/components/lesson-item/lesson-item';
import { ContentSlot, createBoard } from '@wixc3/react-board';
import { ComponentWrapper } from '../../board-wrappers/component-wrapper';
@@ -11,10 +11,4 @@ export default createBoard({
),
- isSnippet: true,
- environmentProps: {
- canvasMargin: { right: 0, bottom: 0, left: 0, top: 0 },
- windowWidth: 1024,
- windowHeight: 768,
- },
});
diff --git a/src/_codux/boards/lesson-page/fake-lesson-page.board.tsx b/_codux/boards/lesson-page/fake-lesson-page.board.tsx
similarity index 79%
rename from src/_codux/boards/lesson-page/fake-lesson-page.board.tsx
rename to _codux/boards/lesson-page/fake-lesson-page.board.tsx
index c781519..8ada022 100644
--- a/src/_codux/boards/lesson-page/fake-lesson-page.board.tsx
+++ b/_codux/boards/lesson-page/fake-lesson-page.board.tsx
@@ -1,6 +1,6 @@
-import { LessonPage } from '../../../pages/lesson-page/lesson-page';
+import { LessonPage } from '~/pages/lesson-page/lesson-page';
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { PageWrapper } from '/src/_codux/board-wrappers/page-wrapper';
+import { PageWrapper } from '../../../_codux/board-wrappers/page-wrapper';
export default createBoard({
name: 'Fake LessonPage',
diff --git a/src/_codux/boards/lessons-list/lessons-list.board.tsx b/_codux/boards/lessons-list/lessons-list.board.tsx
similarity index 51%
rename from src/_codux/boards/lessons-list/lessons-list.board.tsx
rename to _codux/boards/lessons-list/lessons-list.board.tsx
index c38c20d..bb03b79 100644
--- a/src/_codux/boards/lessons-list/lessons-list.board.tsx
+++ b/_codux/boards/lessons-list/lessons-list.board.tsx
@@ -1,6 +1,6 @@
-import { LessonsList } from '../../../components/lessons-list/lessons-list';
+import { LessonsList } from '~/components/lessons-list/lessons-list';
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { ComponentWrapper } from '/src/_codux/board-wrappers/component-wrapper';
+import { ComponentWrapper } from '../../board-wrappers/component-wrapper';
export default createBoard({
name: 'Lessons List',
@@ -11,8 +11,4 @@ export default createBoard({
),
- isSnippet: true,
- environmentProps: {
- canvasMargin: { right: 0, bottom: 0, left: 0, top: 0 },
- },
});
diff --git a/src/_codux/boards/my-profile-page.board.tsx b/_codux/boards/my-profile-page.board.tsx
similarity index 73%
rename from src/_codux/boards/my-profile-page.board.tsx
rename to _codux/boards/my-profile-page.board.tsx
index 10938ec..dd3acb4 100644
--- a/src/_codux/boards/my-profile-page.board.tsx
+++ b/_codux/boards/my-profile-page.board.tsx
@@ -1,6 +1,6 @@
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { PageWrapper } from '/src/_codux/board-wrappers/page-wrapper';
-import { ProfilePage } from '../../pages/profile-page/profile-page';
+import { PageWrapper } from '../board-wrappers/page-wrapper';
+import { ProfilePage } from '~/pages/profile-page/profile-page';
export default createBoard({
name: 'My Profile page',
diff --git a/src/_codux/boards/pages/home-page/page-home.board.tsx b/_codux/boards/pages/home-page/home-page.board.tsx
similarity index 64%
rename from src/_codux/boards/pages/home-page/page-home.board.tsx
rename to _codux/boards/pages/home-page/home-page.board.tsx
index 4d40cb9..3000e0e 100644
--- a/src/_codux/boards/pages/home-page/page-home.board.tsx
+++ b/_codux/boards/pages/home-page/home-page.board.tsx
@@ -1,7 +1,6 @@
-import { HomePage } from '../../../../pages/home-page/home-page';
+import { HomePage } from '~/pages/home-page/home-page';
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { PageWrapperRealData } from '/src/_codux/board-wrappers/page-wrapper-real-data';
-import { waitForProductImage } from '/src/_codux/board-wrappers/wait-for-helpers';
+import { PageWrapperRealData } from '../../../board-wrappers/page-wrapper-real-data';
export default createBoard({
name: '1 - Home Page',
@@ -15,5 +14,4 @@ export default createBoard({
),
isSnippet: false,
environmentProps: { windowWidth: 1920, windowHeight: 1080 },
- readyToSnapshot: waitForProductImage,
});
diff --git a/src/_codux/boards/pages/lesson-page/lesson-page.board.tsx b/_codux/boards/pages/lesson-page/lesson-page.board.tsx
similarity index 74%
rename from src/_codux/boards/pages/lesson-page/lesson-page.board.tsx
rename to _codux/boards/pages/lesson-page/lesson-page.board.tsx
index c827517..c8d09ea 100644
--- a/src/_codux/boards/pages/lesson-page/lesson-page.board.tsx
+++ b/_codux/boards/pages/lesson-page/lesson-page.board.tsx
@@ -1,12 +1,11 @@
-import { LessonPage } from '../../../../pages/lesson-page/lesson-page';
+import { LessonPage } from '~/pages/lesson-page/lesson-page';
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { PageWrapperRealData } from '/src/_codux/board-wrappers/page-wrapper-real-data';
+import { PageWrapperRealData } from '../../../board-wrappers/page-wrapper-real-data';
export default createBoard({
name: '8 - LessonPage',
Board: () => (
//in practice PageWrapperRealData with a path will render the correct page, but it is less convenient to use in a board
-
diff --git a/src/_codux/boards/pages/lessons-page/page-lessons-test-data.board.tsx b/_codux/boards/pages/lessons-page/page-lessons-test-data.board.tsx
similarity index 74%
rename from src/_codux/boards/pages/lessons-page/page-lessons-test-data.board.tsx
rename to _codux/boards/pages/lessons-page/page-lessons-test-data.board.tsx
index 0951693..97d021d 100644
--- a/src/_codux/boards/pages/lessons-page/page-lessons-test-data.board.tsx
+++ b/_codux/boards/pages/lessons-page/page-lessons-test-data.board.tsx
@@ -1,7 +1,7 @@
-import { LessonsPage } from '../../../../pages/lessons-page/lessons-page';
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { PageWrapper } from '/src/_codux/board-wrappers/page-wrapper';
-import { waitForProductImage } from '/src/_codux/board-wrappers/wait-for-helpers';
+import { PageWrapper } from '../../../../_codux/board-wrappers/page-wrapper';
+import { waitForProductImage } from '../../../board-wrappers/wait-for-helpers';
+import { LessonsPage } from '~/pages/lessons-page/lessons-page';
export default createBoard({
name: 'Test Lessons Page',
diff --git a/src/_codux/boards/pages/lessons-page/page-lessons.board.tsx b/_codux/boards/pages/lessons-page/page-lessons.board.tsx
similarity index 55%
rename from src/_codux/boards/pages/lessons-page/page-lessons.board.tsx
rename to _codux/boards/pages/lessons-page/page-lessons.board.tsx
index cd74654..03bfb8f 100644
--- a/src/_codux/boards/pages/lessons-page/page-lessons.board.tsx
+++ b/_codux/boards/pages/lessons-page/page-lessons.board.tsx
@@ -1,7 +1,6 @@
-import { LessonsPage } from '../../../../pages/lessons-page/lessons-page';
+import { LessonsPage } from '~/pages/lessons-page/lessons-page';
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { PageWrapperRealData } from '/src/_codux/board-wrappers/page-wrapper-real-data';
-import { waitForProductImage } from '/src/_codux/board-wrappers/wait-for-helpers';
+import { PageWrapperRealData } from '../../../board-wrappers/page-wrapper-real-data';
export default createBoard({
name: '2 - Lessons Page',
@@ -14,8 +13,4 @@ export default createBoard({
),
isSnippet: false,
- environmentProps: {
- canvasMargin: { right: 0, bottom: 0, left: 0 },
- },
- readyToSnapshot: waitForProductImage,
});
diff --git a/src/_codux/boards/pages/lessons-page/test-lessons-page-mobile.board.tsx b/_codux/boards/pages/lessons-page/test-lessons-page-mobile.board.tsx
similarity index 57%
rename from src/_codux/boards/pages/lessons-page/test-lessons-page-mobile.board.tsx
rename to _codux/boards/pages/lessons-page/test-lessons-page-mobile.board.tsx
index c388eb1..2c234aa 100644
--- a/src/_codux/boards/pages/lessons-page/test-lessons-page-mobile.board.tsx
+++ b/_codux/boards/pages/lessons-page/test-lessons-page-mobile.board.tsx
@@ -1,7 +1,6 @@
-import { LessonsPage } from '../../../../pages/lessons-page/lessons-page';
+import { LessonsPage } from '~/pages/lessons-page/lessons-page';
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { PageWrapper } from '/src/_codux/board-wrappers/page-wrapper';
-import { waitForProductImage } from '/src/_codux/board-wrappers/wait-for-helpers';
+import { PageWrapper } from '../../../board-wrappers/page-wrapper';
export default createBoard({
name: 'Test Lessons Page Mobile',
@@ -19,10 +18,4 @@ export default createBoard({
),
isSnippet: false,
- environmentProps: {
- canvasMargin: { right: 0, bottom: 0, left: 0 },
- windowWidth: 412,
- windowHeight: 915,
- },
- readyToSnapshot: waitForProductImage,
});
diff --git a/src/_codux/boards/pages/my-bookings-page/my-bookings-page.board.tsx b/_codux/boards/pages/my-bookings-page/my-bookings-page.board.tsx
similarity index 72%
rename from src/_codux/boards/pages/my-bookings-page/my-bookings-page.board.tsx
rename to _codux/boards/pages/my-bookings-page/my-bookings-page.board.tsx
index 3eeb249..b3a1f29 100644
--- a/src/_codux/boards/pages/my-bookings-page/my-bookings-page.board.tsx
+++ b/_codux/boards/pages/my-bookings-page/my-bookings-page.board.tsx
@@ -1,6 +1,6 @@
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { PageWrapper } from '/src/_codux/board-wrappers/page-wrapper';
-import { MyBookingsPage } from '../../../../pages/my-bookings-page/my-bookings-page';
+import { PageWrapper } from '../../../board-wrappers/page-wrapper';
+import { MyBookingsPage } from '~/pages/my-bookings-page/my-bookings-page';
export default createBoard({
name: '7 - My Bookings',
diff --git a/src/_codux/boards/pages/thank-you-page/page-thank-you.board.tsx b/_codux/boards/pages/thank-you-page/page-thank-you.board.tsx
similarity index 77%
rename from src/_codux/boards/pages/thank-you-page/page-thank-you.board.tsx
rename to _codux/boards/pages/thank-you-page/page-thank-you.board.tsx
index 1267bfa..4776c68 100644
--- a/src/_codux/boards/pages/thank-you-page/page-thank-you.board.tsx
+++ b/_codux/boards/pages/thank-you-page/page-thank-you.board.tsx
@@ -1,6 +1,6 @@
-import { ThankYouPage } from '../../../../components/thank-you-page/thank-you-page';
+import { ThankYouPage } from '~/components/thank-you-page/thank-you-page';
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { PageWrapper } from '/src/_codux/board-wrappers/page-wrapper';
+import { PageWrapper } from '../../../board-wrappers/page-wrapper';
export default createBoard({
name: '6 - Thank You Page',
diff --git a/src/_codux/boards/payment/payment.board.tsx b/_codux/boards/payment/payment.board.tsx
similarity index 53%
rename from src/_codux/boards/payment/payment.board.tsx
rename to _codux/boards/payment/payment.board.tsx
index 1803d86..b000ec4 100644
--- a/src/_codux/boards/payment/payment.board.tsx
+++ b/_codux/boards/payment/payment.board.tsx
@@ -1,6 +1,6 @@
-import { Payment } from '../../../components/payment/payment';
+import { Payment } from '~/components/payment/payment';
import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { ComponentWrapper } from '/src/_codux/board-wrappers/component-wrapper';
+import { ComponentWrapper } from '../../board-wrappers/component-wrapper';
export default createBoard({
name: 'Payment',
@@ -11,8 +11,4 @@ export default createBoard({
),
- isSnippet: true,
- environmentProps: {
- canvasMargin: { right: 0, bottom: 0, left: 0, top: 0 },
- },
});
diff --git a/src/_codux/component-templates/default/new-component.module.scss b/_codux/component-templates/default/new-component.module.scss
similarity index 100%
rename from src/_codux/component-templates/default/new-component.module.scss
rename to _codux/component-templates/default/new-component.module.scss
diff --git a/src/_codux/component-templates/default/new-component.tsx b/_codux/component-templates/default/new-component.tsx
similarity index 100%
rename from src/_codux/component-templates/default/new-component.tsx
rename to _codux/component-templates/default/new-component.tsx
diff --git a/src/_codux/component-templates/grid/new-component.module.scss b/_codux/component-templates/grid/new-component.module.scss
similarity index 100%
rename from src/_codux/component-templates/grid/new-component.module.scss
rename to _codux/component-templates/grid/new-component.module.scss
diff --git a/src/_codux/component-templates/grid/new-component.tsx b/_codux/component-templates/grid/new-component.tsx
similarity index 100%
rename from src/_codux/component-templates/grid/new-component.tsx
rename to _codux/component-templates/grid/new-component.tsx
diff --git a/src/_codux/component-templates/stack/new-component.module.scss b/_codux/component-templates/stack/new-component.module.scss
similarity index 100%
rename from src/_codux/component-templates/stack/new-component.module.scss
rename to _codux/component-templates/stack/new-component.module.scss
diff --git a/src/_codux/component-templates/stack/new-component.tsx b/_codux/component-templates/stack/new-component.tsx
similarity index 100%
rename from src/_codux/component-templates/stack/new-component.tsx
rename to _codux/component-templates/stack/new-component.tsx
diff --git a/src/_codux/fake-data/fake-data.ts b/_codux/fake-data/fake-data.ts
similarity index 99%
rename from src/_codux/fake-data/fake-data.ts
rename to _codux/fake-data/fake-data.ts
index 82fdb30..eb94097 100644
--- a/src/_codux/fake-data/fake-data.ts
+++ b/_codux/fake-data/fake-data.ts
@@ -1,6 +1,6 @@
import { faker } from '@faker-js/faker';
import { services } from '@wix/bookings';
-import { WixAPI } from '../../api/wix-api-context-provider';
+import { WixAPI } from '~/api/wix-api-context-provider';
import {
FAKE_IMAGES,
FAKE_IMAGES_FOLDER,
diff --git a/src/_codux/fake-data/fake-images.ts b/_codux/fake-data/fake-images.ts
similarity index 100%
rename from src/_codux/fake-data/fake-images.ts
rename to _codux/fake-data/fake-images.ts
diff --git a/src/_codux/fake-data/fake-wix-api-context-provider.tsx b/_codux/fake-data/fake-wix-api-context-provider.tsx
similarity index 96%
rename from src/_codux/fake-data/fake-wix-api-context-provider.tsx
rename to _codux/fake-data/fake-wix-api-context-provider.tsx
index 25c3052..01a263f 100644
--- a/src/_codux/fake-data/fake-wix-api-context-provider.tsx
+++ b/_codux/fake-data/fake-wix-api-context-provider.tsx
@@ -8,7 +8,7 @@ import {
createLessonAvailability,
createUserData,
} from './fake-data';
-import { WixAPI, WixAPIContext } from '../../api/wix-api-context-provider';
+import { WixAPI, WixAPIContext } from '~/api/wix-api-context-provider';
import { faker } from '@faker-js/faker';
import { SWRConfig } from 'swr';
diff --git a/src/_codux/fake-data/images/[100_100]_grey.jpg b/_codux/fake-data/images/[100_100]_grey.jpg
similarity index 100%
rename from src/_codux/fake-data/images/[100_100]_grey.jpg
rename to _codux/fake-data/images/[100_100]_grey.jpg
diff --git a/src/_codux/fake-data/images/[502_310]_blue.jpg b/_codux/fake-data/images/[502_310]_blue.jpg
similarity index 100%
rename from src/_codux/fake-data/images/[502_310]_blue.jpg
rename to _codux/fake-data/images/[502_310]_blue.jpg
diff --git a/src/_codux/fake-data/images/[502_310]_grey.jpg b/_codux/fake-data/images/[502_310]_grey.jpg
similarity index 100%
rename from src/_codux/fake-data/images/[502_310]_grey.jpg
rename to _codux/fake-data/images/[502_310]_grey.jpg
diff --git a/src/_codux/fake-data/images/[502_640]_blue.jpg b/_codux/fake-data/images/[502_640]_blue.jpg
similarity index 100%
rename from src/_codux/fake-data/images/[502_640]_blue.jpg
rename to _codux/fake-data/images/[502_640]_blue.jpg
diff --git a/src/_codux/fake-data/images/[502_640]_grey.jpg b/_codux/fake-data/images/[502_640]_grey.jpg
similarity index 100%
rename from src/_codux/fake-data/images/[502_640]_grey.jpg
rename to _codux/fake-data/images/[502_640]_grey.jpg
diff --git a/codux.config.json b/codux.config.json
index f0f4107..9dd1bb1 100644
--- a/codux.config.json
+++ b/codux.config.json
@@ -1,16 +1,16 @@
{
"$schema": "https://wixplosives.github.io/codux-config-schema/codux.config.schema.json",
- "boardGlobalSetup": "./src/_codux/boards-global-setup.ts",
+ "boardGlobalSetup": "_codux/boards-global-setup.ts",
"componentsDiscovery": {
"include": ["src/**"],
- "exclude": ["src/_codux/component-templates/**"]
+ "exclude": ["_codux/component-templates/**"]
},
"newComponent": {
"componentsPath": "src/components",
- "templatesPath": "src/_codux/component-templates"
+ "templatesPath": "_codux/component-templates"
},
"newBoard": {
- "templatesPath": "src/_codux/board-templates"
+ "templatesPath": "_codux/board-templates"
},
"safeRender": {
"maxInstancesPerComponent": 1000
@@ -33,7 +33,8 @@
"alias": {
"@styles": "./src/styles",
"@styles/*": "./src/styles/*",
- "/*": "./*"
+ "/*": "./*",
+ "~/*": "./src/*"
}
},
"svgLoader": "both"
diff --git a/src/_codux/boards/components/footer/footer.board.tsx b/src/_codux/boards/components/footer/footer.board.tsx
deleted file mode 100644
index 2746228..0000000
--- a/src/_codux/boards/components/footer/footer.board.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Footer } from '../../../../components/site-footer/site-footer';
-import { ContentSlot, createBoard } from '@wixc3/react-board';
-
-export default createBoard({
- name: 'Footer',
- Board: () => (
-
-
-
- ),
- isSnippet: true,
- environmentProps: {
- canvasMargin: {
- top: 0,
- right: 0,
- bottom: 0,
- left: 0,
- },
- },
-});
diff --git a/src/_codux/boards/components/header/header.board.tsx b/src/_codux/boards/components/header/header.board.tsx
deleted file mode 100644
index 0284840..0000000
--- a/src/_codux/boards/components/header/header.board.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Header } from '../../../../components/header/header';
-import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { ComponentWrapper } from '/src/_codux/board-wrappers/component-wrapper';
-
-export default createBoard({
- name: 'Header',
- Board: () => (
-
-
-
-
-
- ),
- isSnippet: true,
- environmentProps: {
- canvasMargin: {
- top: 1,
- right: 0,
- left: 0,
- },
- },
-});
diff --git a/src/_codux/boards/pages/home-page/page-home-test-data.board.tsx b/src/_codux/boards/pages/home-page/page-home-test-data.board.tsx
deleted file mode 100644
index dd9f5fe..0000000
--- a/src/_codux/boards/pages/home-page/page-home-test-data.board.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-import { HomePage } from '../../../../pages/home-page/home-page';
-import { ContentSlot, createBoard } from '@wixc3/react-board';
-import { PageWrapper } from '/src/_codux/board-wrappers/page-wrapper';
-import { waitForProductImage } from '/src/_codux/board-wrappers/wait-for-helpers';
-
-export default createBoard({
- name: 'Test Home Page',
- Board: () => (
- //in practice PageWrapper with a path will render the correct page, but it is less convenient to use in a board
-
-
-
-
-
- ),
- isSnippet: false,
- environmentProps: {
- canvasMargin: { right: 0, bottom: 0, left: 0 },
- windowWidth: 1024,
- windowHeight: 768,
- },
- readyToSnapshot: waitForProductImage,
-});
diff --git a/src/pages/home-page/home-page.tsx b/src/pages/home-page/home-page.tsx
index ed192ac..a81cccf 100644
--- a/src/pages/home-page/home-page.tsx
+++ b/src/pages/home-page/home-page.tsx
@@ -3,7 +3,7 @@ import styles from './home-page.module.scss';
import { HeroImage } from './hero-image/hero-image';
import { ROUTES } from '../../router/config';
import { useNavigate } from 'react-router-dom';
-import { LessonsList } from '../../components/lessons-list/lessons-list';
+import { LessonsList } from '~/components/lessons-list/lessons-list';
export interface HomePageProps {
className?: string;
diff --git a/src/pages/lesson-page/lesson-page.tsx b/src/pages/lesson-page/lesson-page.tsx
index b41f73a..63c26e7 100644
--- a/src/pages/lesson-page/lesson-page.tsx
+++ b/src/pages/lesson-page/lesson-page.tsx
@@ -3,10 +3,10 @@ import { format } from 'date-fns';
import { useMemo, useState } from 'react';
import { useParams } from 'react-router-dom';
import styles from './lesson-page.module.scss';
-import { useAvailability, useLessonBySlug } from '/src/api/api-hooks';
-import { Calendar } from '/src/components/calendar/calendar';
-import { RouteParams } from '/src/router/config';
-import { HourButtons } from '/src/components/hour-buttons/hour-buttons';
+import { useAvailability, useLessonBySlug } from '../../api/api-hooks';
+import { Calendar } from '../../components/calendar/calendar';
+import { RouteParams } from '../../router/config';
+import { HourButtons } from '../../components/hour-buttons/hour-buttons';
export const LessonPage: React.FC = () => {
const { slug } = useParams();
diff --git a/tsconfig.json b/tsconfig.json
index ed8c273..4f1cc01 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -16,8 +16,14 @@
"noEmit": true,
"jsx": "react-jsx",
"baseUrl": "./",
- "paths": { "/*": ["./*"] }
+ "paths": {
+ "~/*": ["./src/*"],
+ }
},
- "include": ["src"],
+ "include": ["src", "_codux"],
"references": [{ "path": "./tsconfig.node.json" }]
}
+
+
+
+