Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jay Mehta
/
zango-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 900b1fae
authored
10 months ago
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
image
1 parent
00914e6b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
31 deletions
components/detail/DetailGallery.js
components/detail/DetailGallery.js
View file @
900b1fa
import
React
,
{
useState
}
from
"react"
;
import
React
,
{
use
Effect
,
use
State
}
from
"react"
;
import
ImageGallery
from
"react-image-gallery"
;
import
ImageGallery
from
"react-image-gallery"
;
import
Image
from
"next/image"
;
import
Image
from
"next/image"
;
import
{
cleanImage
}
from
"../../services/imageHandling"
;
const
DetailGallery
=
({
activityById
})
=>
{
const
DetailGallery
=
({
activityById
})
=>
{
console
.
log
(
"activityById here"
,
activityById
);
// const images = [
// {
const
images
=
[
// original: "/images/product-gallery/01.png",
{
// thumbnail: "/images/product-gallery/01.png"
original
:
"/images/product-gallery/01.png"
,
// },
thumbnail
:
"/images/product-gallery/01.png"
// {
},
// original: "/images/product-gallery/01.png",
{
// thumbnail: "/images/product-gallery/01.png"
original
:
"/images/product-gallery/01.png"
,
// },
thumbnail
:
"/images/product-gallery/01.png"
// {
},
// original: "/images/product-gallery/01.png",
{
// thumbnail: "/images/product-gallery/01.png"
original
:
"/images/product-gallery/01.png"
,
// },
thumbnail
:
"/images/product-gallery/01.png"
// {
},
// original: "/images/product-gallery/01.png",
{
// thumbnail: "/images/product-gallery/01.png"
original
:
"/images/product-gallery/01.png"
,
// },
thumbnail
:
"/images/product-gallery/01.png"
// {
},
// original: "/images/product-gallery/01.png",
{
// thumbnail: "/images/product-gallery/01.png"
original
:
"/images/product-gallery/01.png"
,
// },
thumbnail
:
"/images/product-gallery/01.png"
// {
},
// original: "/images/product-gallery/01.png",
{
// thumbnail: "/images/product-gallery/01.png"
original
:
"/images/product-gallery/01.png"
,
// }
thumbnail
:
"/images/product-gallery/01.png"
// ];
}
// let images = [];
];
const
[
images
,
setimages
]
=
useState
([]);
useEffect
(()
=>
{
setimages
(
activityById
&&
activityById
.
data
.
attributes
.
imagesComponent
.
map
(
item
=>
{
return
{
original
:
cleanImage
(
item
.
image
.
data
.
attributes
),
thumbnail
:
cleanImage
(
item
.
image
.
data
.
attributes
)
};
})
);
},
[
activityById
]);
return
(
return
(
<>
<>
...
@@ -56,6 +68,7 @@ const DetailGallery = ({ activityById }) => {
...
@@ -56,6 +68,7 @@ const DetailGallery = ({ activityById }) => {
<
div
className
=
"product-name"
>
Edge
City
Climb
<
/div
>
<
div
className
=
"product-name"
>
Edge
City
Climb
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
{
activityById
&&
(
<
div
className
=
"product-gallery"
>
<
div
className
=
"product-gallery"
>
<
div
className
=
"row"
>
<
div
className
=
"row"
>
<
div
className
=
"col-12"
>
<
div
className
=
"col-12"
>
...
@@ -64,8 +77,8 @@ const DetailGallery = ({ activityById }) => {
...
@@ -64,8 +77,8 @@ const DetailGallery = ({ activityById }) => {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)}
<
/
>
<
/
>
);
);
};
};
...
...
This diff is collapsed.
Click to expand it.
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