From 9b7794711ca51d3bd4d01102240c073eba6ebadb Mon Sep 17 00:00:00 2001 From: Daria Vdovichenko Date: Mon, 17 Jul 2023 13:00:11 +0200 Subject: [PATCH 1/5] Update [story].tsx add the title of the current story --- pages/kids/stories/[story].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/kids/stories/[story].tsx b/pages/kids/stories/[story].tsx index 08f32a2c..0299ce8f 100644 --- a/pages/kids/stories/[story].tsx +++ b/pages/kids/stories/[story].tsx @@ -40,7 +40,7 @@ const StoriesContainer = ({ story, phrases }: StoriesProps): ReactNode => { return (
From 5da05b69f667cff11fb345c675f653329d7fc5da Mon Sep 17 00:00:00 2001 From: Daria Vdovichenko Date: Tue, 18 Jul 2023 19:46:36 +0200 Subject: [PATCH 2/5] add property 'image' to - stories.ts and index.ts; change defult image to the current image of the story - [story].tsx --- @types/index.ts | 1 + data/stories.ts | 8 ++++++++ pages/kids/stories/[story].tsx | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/@types/index.ts b/@types/index.ts index 8c859de0..e4584ac2 100644 --- a/@types/index.ts +++ b/@types/index.ts @@ -4,6 +4,7 @@ export interface Story { slug: string; duration: string; country: string; + image: string; } /* ENUMS */ diff --git a/data/stories.ts b/data/stories.ts index 69c56278..c4cd30a9 100644 --- a/data/stories.ts +++ b/data/stories.ts @@ -5,48 +5,56 @@ const stories = [ slug: 'pernikova-chaloupka', duration: '3 min', country: 'CZ', + image: 'https://www.movapp.cz/kids/pernikova-chaloupka.jpg', }, { title: { cs: 'O dvanácti měsíčkách', uk: 'Дванадцять місяців', sk: 'O dvanástich mesiačikoch' }, slug: 'dvanact-mesicku', duration: '3 min', country: 'CZ', + image: 'https://www.movapp.cz/kids/dvanact-mesicku.jpg', }, { title: { cs: 'O červené Karkulce', uk: 'Червона Шапочка' }, slug: 'cervena-karkulka', duration: '3 min', country: 'CZ', + image: 'https://www.movapp.cz/kids/cervena-karkulka.jpg', }, { title: { cs: 'O veliké řepě', uk: 'Про велику ріпку' }, slug: 'velika-repa', duration: '3 min', country: 'CZ', + image: 'https://www.movapp.cz/kids/velika-repa.jpg', }, { title: { cs: 'O třech prasátkách', uk: 'Троє поросят' }, slug: 'tri-prasatka', duration: '4 min', country: 'CZ', + image: 'https://www.movapp.cz/kids/tri-prasatka.jpg', }, { title: { cs: 'Ivasik-Telesik', uk: 'Івасик-Телесик' }, slug: 'ivasik-telesik', duration: '4 min', country: 'UA', + image: 'https://www.movapp.cz/kids/ivasik-telesik.jpg', }, { title: { cs: 'O koblížkovi', uk: 'Колобок' }, slug: 'kolobok', duration: '3 min', country: 'UA', + image: 'https://www.movapp.cz/kids/kolobok.jpg', }, { title: { cs: 'Husy-labutě', uk: 'Гуси-Лебеді' }, slug: 'husy-lebedi', duration: '3 min', country: 'UA', + image: 'https://www.movapp.cz/kids/husy-lebedi.jpg', }, ]; diff --git a/pages/kids/stories/[story].tsx b/pages/kids/stories/[story].tsx index 0299ce8f..8bbbfa9d 100644 --- a/pages/kids/stories/[story].tsx +++ b/pages/kids/stories/[story].tsx @@ -36,13 +36,14 @@ const StoriesContainer = ({ story, phrases }: StoriesProps): ReactNode => { const title_current = story.title[currentLanguage] || ''; const title_other = story.title[otherLanguage] || ''; + const image_current_story = story.image || 'https://www.movapp.cz/kids/hrad.png'; return (
{['cs', 'sk'].includes(getCountryVariant()) ? ( <> From 9a6013e7b32e980b7cac2edebce4142bb5c83b83 Mon Sep 17 00:00:00 2001 From: Daria Vdovichenko Date: Tue, 18 Jul 2023 21:24:27 +0200 Subject: [PATCH 3/5] add changes - image current story --- @types/index.ts | 1 - data/stories.ts | 8 -------- pages/kids/stories/[story].tsx | 4 ++-- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/@types/index.ts b/@types/index.ts index e4584ac2..8c859de0 100644 --- a/@types/index.ts +++ b/@types/index.ts @@ -4,7 +4,6 @@ export interface Story { slug: string; duration: string; country: string; - image: string; } /* ENUMS */ diff --git a/data/stories.ts b/data/stories.ts index c4cd30a9..69c56278 100644 --- a/data/stories.ts +++ b/data/stories.ts @@ -5,56 +5,48 @@ const stories = [ slug: 'pernikova-chaloupka', duration: '3 min', country: 'CZ', - image: 'https://www.movapp.cz/kids/pernikova-chaloupka.jpg', }, { title: { cs: 'O dvanácti měsíčkách', uk: 'Дванадцять місяців', sk: 'O dvanástich mesiačikoch' }, slug: 'dvanact-mesicku', duration: '3 min', country: 'CZ', - image: 'https://www.movapp.cz/kids/dvanact-mesicku.jpg', }, { title: { cs: 'O červené Karkulce', uk: 'Червона Шапочка' }, slug: 'cervena-karkulka', duration: '3 min', country: 'CZ', - image: 'https://www.movapp.cz/kids/cervena-karkulka.jpg', }, { title: { cs: 'O veliké řepě', uk: 'Про велику ріпку' }, slug: 'velika-repa', duration: '3 min', country: 'CZ', - image: 'https://www.movapp.cz/kids/velika-repa.jpg', }, { title: { cs: 'O třech prasátkách', uk: 'Троє поросят' }, slug: 'tri-prasatka', duration: '4 min', country: 'CZ', - image: 'https://www.movapp.cz/kids/tri-prasatka.jpg', }, { title: { cs: 'Ivasik-Telesik', uk: 'Івасик-Телесик' }, slug: 'ivasik-telesik', duration: '4 min', country: 'UA', - image: 'https://www.movapp.cz/kids/ivasik-telesik.jpg', }, { title: { cs: 'O koblížkovi', uk: 'Колобок' }, slug: 'kolobok', duration: '3 min', country: 'UA', - image: 'https://www.movapp.cz/kids/kolobok.jpg', }, { title: { cs: 'Husy-labutě', uk: 'Гуси-Лебеді' }, slug: 'husy-lebedi', duration: '3 min', country: 'UA', - image: 'https://www.movapp.cz/kids/husy-lebedi.jpg', }, ]; diff --git a/pages/kids/stories/[story].tsx b/pages/kids/stories/[story].tsx index 8bbbfa9d..b23f0a61 100644 --- a/pages/kids/stories/[story].tsx +++ b/pages/kids/stories/[story].tsx @@ -36,14 +36,14 @@ const StoriesContainer = ({ story, phrases }: StoriesProps): ReactNode => { const title_current = story.title[currentLanguage] || ''; const title_other = story.title[otherLanguage] || ''; - const image_current_story = story.image || 'https://www.movapp.cz/kids/hrad.png'; + const image_current_story = story.slug; return (
{['cs', 'sk'].includes(getCountryVariant()) ? ( <> From b05fd2e9caa47d063f7ee7641ee1baa3b2d604f0 Mon Sep 17 00:00:00 2001 From: Daria Vdovichenko Date: Tue, 18 Jul 2023 22:05:56 +0200 Subject: [PATCH 4/5] Update [story].tsx --- pages/kids/stories/[story].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/kids/stories/[story].tsx b/pages/kids/stories/[story].tsx index b23f0a61..5b2f5499 100644 --- a/pages/kids/stories/[story].tsx +++ b/pages/kids/stories/[story].tsx @@ -43,7 +43,7 @@ const StoriesContainer = ({ story, phrases }: StoriesProps): ReactNode => { {['cs', 'sk'].includes(getCountryVariant()) ? ( <> From 61c599f90f93b1173381b08b97d306daad53f1ca Mon Sep 17 00:00:00 2001 From: Daria Vdovichenko Date: Tue, 18 Jul 2023 22:10:56 +0200 Subject: [PATCH 5/5] fix --- pages/kids/stories/[story].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/kids/stories/[story].tsx b/pages/kids/stories/[story].tsx index 5b2f5499..985018d8 100644 --- a/pages/kids/stories/[story].tsx +++ b/pages/kids/stories/[story].tsx @@ -43,7 +43,7 @@ const StoriesContainer = ({ story, phrases }: StoriesProps): ReactNode => { {['cs', 'sk'].includes(getCountryVariant()) ? ( <>