From 27db81fa46547d37d2115f6a531b3a5545492c43 Mon Sep 17 00:00:00 2001 From: Paul Girard Date: Thu, 29 Sep 2022 09:53:52 +0200 Subject: [PATCH] Stories index page relates #10 --- components/stories/StoriesBlocks.tsx | 37 ++++++++++++++++++++++++++++ pages/index.tsx | 30 ++-------------------- pages/stories/index.tsx | 24 ++++++++++++++++++ 3 files changed, 63 insertions(+), 28 deletions(-) create mode 100644 components/stories/StoriesBlocks.tsx create mode 100644 pages/stories/index.tsx diff --git a/components/stories/StoriesBlocks.tsx b/components/stories/StoriesBlocks.tsx new file mode 100644 index 0000000..ac00db8 --- /dev/null +++ b/components/stories/StoriesBlocks.tsx @@ -0,0 +1,37 @@ +import { FC } from 'react'; +import cx from 'classnames'; + +import { STORIES } from '../../lib/consts'; + +export const StoriesBlock: FC = () => { + return ( +
+ {STORIES.map((story) => ( +
+
+
+ +
+

Story

+

{story.title}

+

{story.description}

+
+ + + En savoir plus → + + +
+
+
+ ))} +
+ ); +}; diff --git a/pages/index.tsx b/pages/index.tsx index e85d909..8f2b399 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -5,6 +5,7 @@ import cx from 'classnames'; import Layout from '../components/Layout'; import Carousel from '../components/Carousel'; import { BASE_PATH, PICTURES, STORIES } from '../lib/consts'; +import { StoriesBlock } from '../components/stories/StoriesBlocks'; const Home: NextPage = () => { return ( @@ -176,34 +177,7 @@ const Home: NextPage = () => { {/* STORY BLOCKS */} -
- {STORIES.map((story) => ( -
-
-
- -
-

Story

-

{story.title}

-

{story.description}

-
- - - En savoir plus → - - -
-
-
- ))} -
+ {/* METHOD BLOCK */}
diff --git a/pages/stories/index.tsx b/pages/stories/index.tsx new file mode 100644 index 0000000..b65b090 --- /dev/null +++ b/pages/stories/index.tsx @@ -0,0 +1,24 @@ +import Head from 'next/head'; +import { FC } from 'react'; +import Layout from '../../components/Layout'; +import { StoriesBlock } from '../../components/stories/StoriesBlocks'; + +const StoriesPage: FC = () => { + return ( + + + Respadon | Stories + + + + +
+
+ +
+
+
+ ); +}; + +export default StoriesPage;