[yoga-15] add new service-list-page
This commit is contained in:
37
yoga-app/src/app/serviceList/page.tsx
Normal file
37
yoga-app/src/app/serviceList/page.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import React from "react";
|
||||
import AosComponent from "@/components/aos.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";
|
||||
import SingleServiceComponent from "@/components/single.service.component";
|
||||
|
||||
export default async function Services() {
|
||||
const {
|
||||
header,
|
||||
description,
|
||||
footer,
|
||||
subscribeNow,
|
||||
common,
|
||||
services
|
||||
} = await strapiApi.getServiceListPage();
|
||||
console.info("ServiceListPage", services.length, services.map);
|
||||
return (
|
||||
<>
|
||||
<SubHeaderComponent header={{header1:header,description}} common={common}/>
|
||||
{
|
||||
services && services.length > 0 && services.map( singleService => {
|
||||
return (
|
||||
<SingleServiceComponent key={singleService.id} config={singleService} />
|
||||
)
|
||||
})
|
||||
}
|
||||
{ subscribeNow && <SubscribeComponent config={subscribeNow} /> }
|
||||
{ footer && <FooterComponent config={footer} /> }
|
||||
<AosComponent />
|
||||
</>
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
Reference in New Issue
Block a user