add services page
This commit is contained in:
102
yoga-app/src/api/strapi/query/services.json
Normal file
102
yoga-app/src/api/strapi/query/services.json
Normal file
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"ourServices": {
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"services": {
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"image": {
|
||||
"fields": ["name","mime","url"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactUs": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"ourSpecialities": {
|
||||
"fields": ["*"] ,
|
||||
"populate": {
|
||||
"left1": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"left2": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"left3": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"left4": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"right1": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"right2": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"right3": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"right4": {
|
||||
"fields": ["*"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"feedbacks": {
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"feedbacks": {
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"customerImage": {
|
||||
"fields": ["name","mime","url"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"blogs": {
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"button": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"posts": {
|
||||
"fields": ["name", "id", "header","documentId" ],
|
||||
"populate": {
|
||||
"tags": {
|
||||
"fields": ["*" ]
|
||||
},
|
||||
"teaserImage": {
|
||||
"fields": ["name","mime","url"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"subscribe": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"footer": {
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"links": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"contactUsEmail": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"contactUsLocation": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"contactUsPhoneNumber": {
|
||||
"fields": ["*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
104
yoga-app/src/api/strapi/query/services.json.bak
Normal file
104
yoga-app/src/api/strapi/query/services.json.bak
Normal file
@@ -0,0 +1,104 @@
|
||||
{
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
|
||||
"ourServices": {
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"services": {
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"image": {
|
||||
"fields": ["name","mime","url"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactUs": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"ourSpecialities": {
|
||||
"fields": ["*"] ,
|
||||
"populate": {
|
||||
"left1": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"left2": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"left3": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"left4": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"right1": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"right2": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"right3": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"right4": {
|
||||
"fields": ["*"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"feedbacks": {
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"feedbacks": {
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"customerImage": {
|
||||
"fields": ["name","mime","url"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"blogs": {
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"button": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"posts": {
|
||||
"fields": ["name", "id", "header","documentId" ],
|
||||
"populate": {
|
||||
"tags": {
|
||||
"fields": ["*" ]
|
||||
},
|
||||
"teaserImage": {
|
||||
"fields": ["name","mime","url"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"subscribeNow": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"footer": {
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"links": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"contactUsEmail": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"contactUsLocation": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"contactUsPhoneNumber": {
|
||||
"fields": ["*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,10 @@ import strapiClient from "@/api/strapi/strapi-client";
|
||||
import qs from "qs";
|
||||
import aboutQuery from "@/api/strapi/query/about.json";
|
||||
import homeQuery from "@/api/strapi/query/home.json";
|
||||
import servicesQuery from "@/api/strapi/query/services.json";
|
||||
import {YogaBlogPost_Plain} from "@/types/generated-strapi-interfaces/api/yoga-blog-post";
|
||||
import {Home_Plain} from "@/types/generated-strapi-interfaces/api/home";
|
||||
import {ServicesPage_Plain} from "@/types/generated-strapi-interfaces/api/services-page";
|
||||
|
||||
|
||||
class StrapiApi{
|
||||
@@ -28,7 +30,10 @@ class StrapiApi{
|
||||
|
||||
public getHomePage(): Promise<Home_Plain>{
|
||||
return this.getJson("/api/home?",homeQuery);
|
||||
}
|
||||
|
||||
public getServicesPage(): Promise<ServicesPage_Plain>{
|
||||
return this.getJson("/api/services-page?",servicesQuery);
|
||||
}
|
||||
|
||||
public getBlog(blogId: string): Promise<YogaBlogPost_Plain>{
|
||||
|
||||
@@ -9,19 +9,31 @@ import FeedbackComponent from "@/components/feedbackComponent";
|
||||
import BlogPostsComponent from "@/components/blog.posts.component";
|
||||
import FooterComponent from "@/components/footer.component";
|
||||
import SubscribeComponent from "@/components/subscribe.component";
|
||||
import strapiApi from "@/api/strapi/strapi-api";
|
||||
import SubHeaderComponent from "@/components/subHeader.component";
|
||||
|
||||
export default function About() {
|
||||
export default async function Services() {
|
||||
const {
|
||||
header,
|
||||
description,
|
||||
ourServices,
|
||||
contactUs,
|
||||
ourSpecialities,
|
||||
feedbacks,
|
||||
blogs,
|
||||
footer,
|
||||
subscribe
|
||||
} = await strapiApi.getServicesPage();
|
||||
return (
|
||||
<>
|
||||
<OurServicesComponent />
|
||||
<AboutUsComponent />
|
||||
<OurSpecialitiesComponent />
|
||||
<ContactUsComponent />
|
||||
<PricingComponent />
|
||||
<FeedbackComponent />
|
||||
<BlogPostsComponent />
|
||||
<SubscribeComponent />
|
||||
<FooterComponent />
|
||||
{header && description && <SubHeaderComponent header1={header} description={description} />}
|
||||
{ ourServices && <OurServicesComponent header={ourServices.header!} title={ourServices.title!} description={ourServices.description!} /> }
|
||||
{ contactUs && <ContactUsComponent contactUs={contactUs} />}
|
||||
{ ourSpecialities && <OurSpecialitiesComponent config={ourSpecialities} /> }
|
||||
{ feedbacks && <FeedbackComponent config={feedbacks} /> }
|
||||
{ blogs && <BlogPostsComponent config={blogs} /> }
|
||||
{ subscribe && <SubscribeComponent config={subscribe} /> }
|
||||
{ footer && <FooterComponent config={footer} /> }
|
||||
<AosComponent />
|
||||
</>
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { YogaOurServicesComponent } from './yoga-our-services-component';
|
||||
import { YogaContactUs } from './yoga-contact-us';
|
||||
import { YogaSpecialitiesComponent } from './yoga-specialities-component';
|
||||
import { YogaCustomerFeedbackComponent } from './yoga-customer-feedback-component';
|
||||
import { YogaBlogPostsComponent } from './yoga-blog-posts-component';
|
||||
import { YogaSubscribeNowComponent } from './yoga-subscribe-now-component';
|
||||
import { YogaFooter } from './yoga-footer';
|
||||
import { YogaOurServicesComponent_Plain } from './yoga-our-services-component';
|
||||
import { YogaContactUs_Plain } from './yoga-contact-us';
|
||||
import { YogaSpecialitiesComponent_Plain } from './yoga-specialities-component';
|
||||
import { YogaCustomerFeedbackComponent_Plain } from './yoga-customer-feedback-component';
|
||||
import { YogaBlogPostsComponent_Plain } from './yoga-blog-posts-component';
|
||||
import { YogaSubscribeNowComponent_Plain } from './yoga-subscribe-now-component';
|
||||
import { YogaFooter_Plain } from './yoga-footer';
|
||||
import { AdminPanelRelationPropertyModification } from '../common/AdminPanelRelationPropertyModification';
|
||||
|
||||
export interface ServicesPage {
|
||||
id: number;
|
||||
attributes: {
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string;
|
||||
description?: string;
|
||||
ourServices?: { data: YogaOurServicesComponent };
|
||||
contactUs?: { data: YogaContactUs };
|
||||
ourSpecialities?: { data: YogaSpecialitiesComponent };
|
||||
feedbacks?: { data: YogaCustomerFeedbackComponent };
|
||||
blogs?: { data: YogaBlogPostsComponent };
|
||||
subscribe?: { data: YogaSubscribeNowComponent };
|
||||
footer?: { data: YogaFooter };
|
||||
title?: string;
|
||||
};
|
||||
}
|
||||
export interface ServicesPage_Plain {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string;
|
||||
description?: string;
|
||||
ourServices?: YogaOurServicesComponent_Plain;
|
||||
contactUs?: YogaContactUs_Plain;
|
||||
ourSpecialities?: YogaSpecialitiesComponent_Plain;
|
||||
feedbacks?: YogaCustomerFeedbackComponent_Plain;
|
||||
blogs?: YogaBlogPostsComponent_Plain;
|
||||
subscribe?: YogaSubscribeNowComponent_Plain;
|
||||
footer?: YogaFooter_Plain;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface ServicesPage_NoRelations {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string;
|
||||
description?: string;
|
||||
ourServices?: number;
|
||||
contactUs?: number;
|
||||
ourSpecialities?: number;
|
||||
feedbacks?: number;
|
||||
blogs?: number;
|
||||
subscribe?: number;
|
||||
footer?: number;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface ServicesPage_AdminPanelLifeCycle {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string;
|
||||
description?: string;
|
||||
ourServices?: AdminPanelRelationPropertyModification<YogaOurServicesComponent_Plain>;
|
||||
contactUs?: AdminPanelRelationPropertyModification<YogaContactUs_Plain>;
|
||||
ourSpecialities?: AdminPanelRelationPropertyModification<YogaSpecialitiesComponent_Plain>;
|
||||
feedbacks?: AdminPanelRelationPropertyModification<YogaCustomerFeedbackComponent_Plain>;
|
||||
blogs?: AdminPanelRelationPropertyModification<YogaBlogPostsComponent_Plain>;
|
||||
subscribe?: AdminPanelRelationPropertyModification<YogaSubscribeNowComponent_Plain>;
|
||||
footer?: AdminPanelRelationPropertyModification<YogaFooter_Plain>;
|
||||
title?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user