catalogue.js
1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
"use client";
import InnerDetailsCatalogue from "@/components/Catalogue/InnerDetailsCatalogue";
import Breadcrumb from "@/components/Common/Breadcrumb";
import HeadTitle from "@/components/Common/HeadTitle";
import InnerBanner from "@/components/Common/InnerBanner";
import InnerContent from "@/components/Contacts/InnerContent";
import { getCataloguesBySlug } from "@/services/cataloguesApi";
import Head from "next/head";
const bannerData = [
{
image: "/image/inner-banner/contacts.png",
title: "Banner",
}
];
const headTitleData = [
{
title: "Catalogue",
description:"Our Akruti Luxe Catalogue brings together iconic designs, premium materials,<br /> and Contemporary elegance—your guide to living beautifully.",
}
];
const breadcrumbData = [
{
href: "/",
label: "Catalogue"
},
];
const ContactsPage = ({cataloguesData={cataloguesData}}) => {
return (
<>
<Head>
<title>Akruti </title>
<meta name="description" content="Akruti" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/favicon.ico" />
</Head>
<Breadcrumb breadcrumbData={breadcrumbData} />
<HeadTitle categoryData={headTitleData[0] || []} />
<InnerDetailsCatalogue cataloguesData={cataloguesData} />
</>
);
};
export default ContactsPage;
export async function getServerSideProps({ params }) {
try {
const cataloguesData = await getCataloguesBySlug();
return {
props: {
cataloguesData,
},
};
} catch (error) {
console.error("Product page SSR error:", error);
return { notFound: true };
}
}