Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
sujata
/
Akruti-Frontend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Registry
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit ad066fff
authored
2026-02-21 13:00:51 +0530
by
Ravindra Kanojiya
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update pdf
1 parent
b4dc67cd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
54 deletions
components/Catalogue/InnerDetailsCatalogue.js
pages/catalogue.js
pages/index.js
services/cataloguesApi.js
components/Catalogue/InnerDetailsCatalogue.js
View file @
ad066ff
...
...
@@ -2,63 +2,65 @@ import Image from "next/image";
import
Link
from
"next/link"
;
import
React
,
{
useState
}
from
"react"
;
import
{
Col
,
Row
}
from
"react-bootstrap"
;
import
{
cleanImage
}
from
"../services/imageHandling"
;
const
CatalogueData
=
[
{
productSlug
:
"ecosophia"
,
title
:
"Ecosophia"
,
image
:
"/image/Catalogue/01.png"
,
},
{
productSlug
:
"architectural-scenarios"
,
title
:
"Architectural Scenarios"
,
image
:
"/image/Catalogue/02.png"
,
},
{
productSlug
:
"vitrum-arte"
,
title
:
"Vitrum Arte"
,
image
:
"/image/Catalogue/03.png"
,
},
{
productSlug
:
"genius-loci"
,
title
:
"Genius Loci"
,
image
:
"/image/Catalogue/04.png"
,
},
{
productSlug
:
"essenza"
,
title
:
"Essenza"
,
image
:
"/image/Catalogue/05.png"
,
},
{
productSlug
:
"domus-anthology"
,
title
:
"Domus Anthology"
,
image
:
"/image/Catalogue/06.png"
,
},
{
productSlug
:
"vitrum-arte"
,
title
:
"Vitrum Arte"
,
image
:
"/image/Catalogue/07.png"
,
},
{
productSlug
:
"ecosophia"
,
title
:
"Ecosophia"
,
image
:
"/image/Catalogue/08.png"
,
},
{
productSlug
:
"architectural-scenarios"
,
title
:
"Architectural Scenarios"
,
image
:
"/image/Catalogue/09.png"
,
},
];
//
const CatalogueData = [
//
{
//
productSlug: "ecosophia",
//
title: "Ecosophia",
//
image: "/image/Catalogue/01.png",
//
},
//
{
//
productSlug: "architectural-scenarios",
//
title: "Architectural Scenarios",
//
image: "/image/Catalogue/02.png",
//
},
//
{
//
productSlug: "vitrum-arte",
//
title: "Vitrum Arte",
//
image: "/image/Catalogue/03.png",
//
},
//
{
//
productSlug: "genius-loci",
//
title: "Genius Loci",
//
image: "/image/Catalogue/04.png",
//
},
//
{
//
productSlug: "essenza",
//
title: "Essenza",
//
image: "/image/Catalogue/05.png",
//
},
//
{
//
productSlug: "domus-anthology",
//
title: "Domus Anthology",
//
image: "/image/Catalogue/06.png",
//
},
//
{
//
productSlug: "vitrum-arte",
//
title: "Vitrum Arte",
//
image: "/image/Catalogue/07.png",
//
},
//
{
//
productSlug: "ecosophia",
//
title: "Ecosophia",
//
image: "/image/Catalogue/08.png",
//
},
//
{
//
productSlug: "architectural-scenarios",
//
title: "Architectural Scenarios",
//
image: "/image/Catalogue/09.png",
//
},
//
];
const
InnerDetailsCatalogue
=
({
subCategory
=
"All Catalogue"
})
=>
{
const
InnerDetailsCatalogue
=
({
subCategory
=
"All Catalogue"
,
cataloguesData
})
=>
{
console
.
log
(
"cataloguesData, llll"
,
cataloguesData
)
const
[
sort
,
setSort
]
=
useState
(
""
);
const
handleChange
=
(
e
)
=>
{
setSort
(
e
.
target
.
value
);
};
const
sortedProducts
=
[...
Catalogue
Data
].
sort
((
a
,
b
)
=>
{
const
sortedProducts
=
[...
catalogues
Data
].
sort
((
a
,
b
)
=>
{
if
(
sort
===
"name-asc"
)
return
a
.
title
.
localeCompare
(
b
.
title
);
if
(
sort
===
"name-desc"
)
return
b
.
title
.
localeCompare
(
a
.
title
);
return
0
;
...
...
@@ -94,11 +96,11 @@ const InnerDetailsCatalogue = ({ subCategory = "All Catalogue" }) => {
{
sortedProducts
.
map
((
product
,
index
)
=>
(
<
Col
md
=
{
4
}
key
=
{
`
${
product
.
productSlug
}
-
${
index
}
`
}
>
<
div
className
=
"collections-item"
>
<
Link
href
=
"#
"
>
<
Link
href
=
{
product
?.
pdfLink
?.
url
||
""
}
target
=
"_blank
"
>
<
Image
width
=
{
868
}
height
=
{
560
}
src
=
{
product
.
image
}
src
=
{
cleanImage
(
product
.
image
?.
url
)
}
alt
=
{
product
.
title
}
/
>
<
div
className
=
"title"
>
{
product
.
title
}
<
/div
>
...
...
pages/catalogue.js
View file @
ad066ff
...
...
@@ -4,6 +4,7 @@ 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
=
[
{
...
...
@@ -25,7 +26,8 @@ const breadcrumbData = [
},
];
const
ContactsPage
=
()
=>
{
const
ContactsPage
=
({
cataloguesData
=
{
cataloguesData
}})
=>
{
console
.
log
(
"cataloguesData -mainnn"
,
cataloguesData
)
return
(
<>
<
Head
>
...
...
@@ -36,8 +38,24 @@ const ContactsPage = () => {
<
/Head
>
<
Breadcrumb
breadcrumbData
=
{
breadcrumbData
}
/
>
<
HeadTitle
categoryData
=
{
headTitleData
[
0
]
||
[]}
/
>
<
InnerDetailsCatalogue
/>
<
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
};
}
}
\ No newline at end of file
pages/index.js
View file @
ad066ff
...
...
@@ -12,7 +12,7 @@ import { getCataloguesBySlug } from "@/services/cataloguesApi";
import
{
getHomeSlug
}
from
"@/services/homeApi"
;
const
Home
=
({
homepage
,
cataloguesData
=
{
cataloguesData
},
homeData
})
=>
{
console
.
log
(
"homeData"
,
home
Data
)
console
.
log
(
"homeData"
,
catalogues
Data
)
return
(
<>
<
Head
>
...
...
services/cataloguesApi.js
View file @
ad066ff
...
...
@@ -5,6 +5,7 @@ export async function getCataloguesBySlug() {
const
query
=
{
populate
:
{
image
:
true
,
pdfLink
:
true
},
};
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment