From 886505885b088e10a8ede3f776abaa031bf5246e Mon Sep 17 00:00:00 2001 From: Schneider Roland Date: Fri, 28 Mar 2025 22:09:28 +0100 Subject: [PATCH] fix yoga services --- yoga-app/src/app/page.tsx | 2 +- .../src/components/our.services.component.tsx | 79 +++---------------- .../our.services.item.component.tsx | 39 +++++++++ 3 files changed, 51 insertions(+), 69 deletions(-) create mode 100644 yoga-app/src/components/our.services.item.component.tsx diff --git a/yoga-app/src/app/page.tsx b/yoga-app/src/app/page.tsx index 768ef5c..50f22ac 100644 --- a/yoga-app/src/app/page.tsx +++ b/yoga-app/src/app/page.tsx @@ -34,8 +34,8 @@ export default async function Home() { return ( <> { header && } - { ourServices && } { aboutUs && } + { ourServices && } { ourSpecialities && } { contactUs && } { prices && } diff --git a/yoga-app/src/components/our.services.component.tsx b/yoga-app/src/components/our.services.component.tsx index 663142d..bd5d443 100644 --- a/yoga-app/src/components/our.services.component.tsx +++ b/yoga-app/src/components/our.services.component.tsx @@ -1,11 +1,14 @@ import YogaImageComponent from "@/components/yoga.image.component"; +import { + OurServicesComponent_Plain +} from "@/types/generated-strapi-interfaces/components/yoga-site/OurServicesComponent"; +import {YogaOurServicesComponent_Plain} from "@/types/generated-strapi-interfaces/api/yoga-our-services-component"; +import OurServiceItemComponent from "@/components/our.services.item.component"; export interface Props{ - title: string; - header: string; - description: string; + config: YogaOurServicesComponent_Plain } -const OurServiceComponent = ({title,header,description}: Props) => { +const OurServiceComponent = ({config: {title,header,description,services}}: Props) => { return (
@@ -19,70 +22,10 @@ const OurServiceComponent = ({title,header,description}: Props) => {
-
-
-
-
-
-
-

Prenatal Yoga

-

Finibus metus elit tempus faucibus urna nunc aui.

-
- -
-
-
-
-
-
-
-
-
-
-

Meditation

-

Ainibus metus elit tempus faucibus urna nunc cui.

-
- -
-
-
-
-
-
-
-
-
-
-

Nutrition Consultation

-

Binibus metus elit tempus faucibus urna nunc eui.

-
- -
-
-
-
-
-
-
-
-
-
-

Hatha Yoga

-

Dinibus metus elit tempus faucibus urna nunc rui.

-
- -
-
-
-
+ {services.map( + itemConfig => + + )}
diff --git a/yoga-app/src/components/our.services.item.component.tsx b/yoga-app/src/components/our.services.item.component.tsx new file mode 100644 index 0000000..6ecb93a --- /dev/null +++ b/yoga-app/src/components/our.services.item.component.tsx @@ -0,0 +1,39 @@ +import YogaImageComponent from "@/components/yoga.image.component"; +import { + OurServicesComponent_Plain +} from "@/types/generated-strapi-interfaces/components/yoga-site/OurServicesComponent"; +import {YogaOurServicesComponent_Plain} from "@/types/generated-strapi-interfaces/api/yoga-our-services-component"; +import {YogaSingleService_Plain} from "@/types/generated-strapi-interfaces/api/yoga-single-service"; +import {StrapiFile} from "@/types/types"; +import strapiApi from "@/api/strapi/strapi-api"; + +export interface Props { + config: YogaSingleService_Plain +} + +const OurServiceItemComponent = ({config: {header,description,image}}: Props) => { + const imageFile: StrapiFile = image as StrapiFile; + return ( + +
+
+
+
+ +
+
+
+

{header}

+

{description}

+
+ +
+
+
+
+ + ); +} + +export default OurServiceItemComponent;