diff --git a/services/app/source/04-templates/LandingPage/LandingPage.stories.tsx b/services/app/source/04-templates/LandingPage/LandingPage.stories.tsx new file mode 100644 index 00000000..358434ab --- /dev/null +++ b/services/app/source/04-templates/LandingPage/LandingPage.stories.tsx @@ -0,0 +1,23 @@ +import { Meta, StoryObj } from '@storybook/react'; +import React from 'react'; +import { WYSIWYG } from '../../03-components/Wysiwyg/Wysiwyg.stories'; +import LandingPageTemplate from './LandingPage'; + +const meta: Meta = { + title: 'Templates/Landing Page', + component: LandingPageTemplate, +}; + +const LandingPage: StoryObj = { + render: args => ( + + {WYSIWYG.render && } + + ), + args: { + title: 'Landing Page Title', + }, +}; + +export default meta; +export { LandingPage }; diff --git a/services/app/source/04-templates/LandingPage/LandingPage.tsx b/services/app/source/04-templates/LandingPage/LandingPage.tsx index f4659c7e..07c9ee1d 100644 --- a/services/app/source/04-templates/LandingPage/LandingPage.tsx +++ b/services/app/source/04-templates/LandingPage/LandingPage.tsx @@ -2,10 +2,12 @@ import Head from 'next/head'; import { ReactNode } from 'react'; import { MAIN_ID } from '../../00-config/constants'; import Main from '../../02-layouts/Main/Main'; +import PageTitle from '../../03-components/PageTitle/PageTitle'; interface PageProps { mainId?: string; title: string; + hidePageTitle?: boolean; description?: string; children?: ReactNode; } @@ -13,6 +15,7 @@ interface PageProps { function LandingPage({ mainId = MAIN_ID, title, + hidePageTitle, description, children, }: PageProps): JSX.Element { @@ -22,7 +25,10 @@ function LandingPage({ {title} {description && } -
{children}
+
+ {!hidePageTitle && title && } + {children} +
); } diff --git a/services/app/source/05-pages/Homepage.stories.tsx b/services/app/source/05-pages/Homepage.stories.tsx index 27f02639..bea32623 100644 --- a/services/app/source/05-pages/Homepage.stories.tsx +++ b/services/app/source/05-pages/Homepage.stories.tsx @@ -22,7 +22,7 @@ const settings: Meta = { const Homepage: StoryObj = { render: args => ( - +