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 c7d3b7d4
authored
2024-05-28 17:05:58 +0530
by
Ravindra Kanojiya
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
https://git.logicloop.io/jaymehta/zango-frontend
2 parents
18951923
32aca5f0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
49 additions
and
16 deletions
components/detail/DetailInfo.js
components/home/BrowseExperiences.js
components/home/GiftAnExperience.js
components/home/LetDiscover.js
components/home/SearchBar.js
components/layout/Header.js
components/listing/LetDiscover.js
components/listing/ListingInner.js
components/detail/DetailInfo.js
View file @
c7d3b7d
...
...
@@ -111,7 +111,7 @@ const DetailInfo = ({ activityById }) => {
<
div
className
=
"location"
>
Location
&
Address
<
/div
>
<
div
className
=
"mb-2"
>
Chelsea
<
/div
>
{
/* <div className="mb-2">Chelsea </div> */
}
<
div
className
=
""
>
{
activityById
.
data
.
attributes
.
address
}
<
/div
>
<
div
className
=
"btn-row"
>
<
Button
...
...
components/home/BrowseExperiences.js
View file @
c7d3b7d
...
...
@@ -34,7 +34,14 @@ const BrowseExperiences = ({ allActivitiesData }) => {
<
/div
>
<
/motion.div
>
<
div
className
=
"view-all-btn"
>
<
Button
variant
=
"primary"
>
View
All
<
/Button
>
<
Button
variant
=
"primary"
onClick
=
{()
=>
{
router
.
push
(
"/listing"
);
}}
>
View
All
<
/Button
>
<
/div
>
<
/div
>
<
/div
>
...
...
components/home/GiftAnExperience.js
View file @
c7d3b7d
...
...
@@ -3,7 +3,9 @@ import React from "react";
import
{
Button
}
from
"react-bootstrap"
;
import
{
motion
}
from
"framer-motion"
;
import
{
fadeIn
,
zoomIn
,
slideFromLeft
,
slideFromRight
}
from
"../animationvariants.js"
;
import
{
useRouter
}
from
"next/router.js"
;
const
GiftAnExperience
=
()
=>
{
const
router
=
useRouter
();
return
(
<>
<
section
className
=
"gift-an-experience-session"
>
...
...
@@ -18,7 +20,9 @@ const GiftAnExperience = () => {
<
div
className
=
"title"
>
Gift
An
Experience
For
Any
Occasion
<
/div
>
<
div
className
=
"disc"
>
Lorem
ipsum
dolor
sit
amet
,
consectetur
adipiscing
elit
,
sed
do
eiusmod
tempor
incididunt
.
<
/div
>
<
div
>
<
Button
variant
=
"primary"
>
Gift
An
Experience
<
/Button
>
<
Button
variant
=
"primary"
onClick
=
{()
=>
{
router
.
push
(
"/gift-card"
)
}}
>
Gift
An
Experience
<
/Button
>
<
/div
>
<
/div
>
<
/motion.div
>
...
...
components/home/LetDiscover.js
View file @
c7d3b7d
...
...
@@ -12,7 +12,9 @@ import "swiper/css";
import
"swiper/css/pagination"
;
import
"swiper/css/navigation"
;
import
{
cleanImage
}
from
"../../services/imageHandling.js"
;
import
{
useRouter
}
from
"next/router.js"
;
const
LetDiscover
=
({
categories
})
=>
{
const
router
=
useRouter
();
return
(
<>
<
section
className
=
"let-discover-session"
>
...
...
@@ -30,7 +32,14 @@ const LetDiscover = ({ categories }) => {
<
/div
>
<
/motion.div
>
<
div
className
=
"view-all-btn"
>
<
Button
href
=
"/listing"
variant
=
"primary"
>
View
All
<
/Button
>
<
Button
onClick
=
{()
=>
{
router
.
push
(
"/listing"
);
}}
variant
=
"primary"
>
View
All
<
/Button
>
<
/div
>
<
/div
>
<
/div
>
...
...
@@ -67,7 +76,7 @@ const LetDiscover = ({ categories }) => {
}}
className
=
"mySwiper01 mySwiper02"
>
<
SwiperSlide
>
{
/*
<SwiperSlide>
<motion.div variants={zoomIn("left", 0.3)} initial={"hidden"} whileInView={"show"} viewport={{ once: false, amount: 0.2 }}>
<a href="">
<span className="image-container">
...
...
@@ -76,13 +85,17 @@ const LetDiscover = ({ categories }) => {
<div className="title">ALL</div>
</a>
</motion.div>
<
/SwiperSlide
>
</SwiperSlide>
*/
}
{
categories
?.
data
&&
categories
.
data
.
map
((
data
,
index
)
=>
{
return
(
<
SwiperSlide
key
=
{
data
?.
id
}
>
<
motion
.
div
variants
=
{
zoomIn
(
"left"
,
0.3
)}
initial
=
{
"hidden"
}
whileInView
=
{
"show"
}
viewport
=
{{
once
:
false
,
amount
:
0.2
}}
>
<
a
href
=
""
>
<
a
onClick
=
{()
=>
{
router
.
push
(
`/listing?category=
${
data
.
id
}
`
);
}}
>
<
span
className
=
"image-container"
>
<
Image
layout
=
"fill"
alt
=
""
className
=
"image img-fluid"
src
=
{
cleanImage
(
data
?.
attributes
?.
image
?.
data
?.
attributes
)}
/
>
<
/span
>
...
...
components/home/SearchBar.js
View file @
c7d3b7d
...
...
@@ -25,6 +25,9 @@ const SearchBar = () => {
open
=
{
open
}
id
=
"select"
placeholder
=
"Search for products, brands or categories"
onBlur
=
{()
=>
{
setopen
(
false
)
}}
onChange
=
{
selected
=>
{
console
.
log
(
"selected"
,
selected
);
// router.push("/listing");
...
...
components/layout/Header.js
View file @
c7d3b7d
...
...
@@ -67,6 +67,9 @@ const Header = () => {
<
div
className
=
"header-search"
>
<
Typeahead
open
=
{
open
}
onBlur
=
{()
=>
{
setopen
(
false
);
}}
id
=
"select"
placeholder
=
"Search for products, brands or categories"
onChange
=
{
selected
=>
{
...
...
components/listing/LetDiscover.js
View file @
c7d3b7d
...
...
@@ -42,7 +42,14 @@ const LetDiscover = ({ categories }) => {
// useEffect(() => {
// dispatch(getSubCategoriesByCategoryId(router.query.category));
// }, [router]);
useEffect
(()
=>
{
console
.
log
(
"router.query.category"
,
router
.
query
.
category
);
if
(
router
.
query
.
category
)
{
dispatch
(
setActivityFilters
({
filters
:
{
category
:
router
.
query
.
category
,
subCategories
:
[]
}
}));
setActiveIndex
(
router
.
query
.
category
);
dispatch
(
getSubCategoriesByCategoryId
(
router
.
query
.
category
));
}
},
[]);
const
[
showCloseIcon
,
setShowCloseIcon
]
=
useState
({});
const
handleToggleCloseIcon
=
index
=>
{
setShowCloseIcon
(
prevShowCloseIcon
=>
({
...
...
@@ -102,7 +109,7 @@ const LetDiscover = ({ categories }) => {
<
SwiperSlide
>
<
motion
.
div
variants
=
{
zoomIn
(
"left"
,
0.3
)}
initial
=
{
"hidden"
}
whileInView
=
{
"show"
}
viewport
=
{{
once
:
false
,
amount
:
0.2
}}
>
<
a
className
=
{
activeIndex
==
"All"
?
"active"
:
""
}
className
=
{
activeIndex
==
"All"
?
"active"
:
""
}
onClick
=
{()
=>
{
dispatch
(
setActivityFilters
({
filters
:
{}
}));
handleTitleClick
({
index
:
"All"
});
...
...
@@ -163,7 +170,8 @@ const LetDiscover = ({ categories }) => {
<
div
className
=
"col-12 text-center"
>
{
!
loading
?
(
<
div
className
=
"sub-categories"
>
{
activityFilters
.
category
&&
subCategories
&&
{
activityFilters
.
category
&&
subCategories
&&
subCategories
.
data
.
map
((
data
,
index
)
=>
(
<
SubCategoryChips
key
=
{
index
}
data
=
{
data
}
/
>
// <a key={index} onClick={() => handleToggleCloseIcon(index)}>
...
...
components/listing/ListingInner.js
View file @
c7d3b7d
...
...
@@ -30,12 +30,7 @@ const ListingInner = ({ allActivitiesData, loading, totalCount }) => {
const
handleGridChange
=
className
=>
{
setGridClass
(
className
);
};
useEffect
(()
=>
{
console
.
log
(
"router.query.category"
,
router
.
query
.
category
);
if
(
router
.
query
.
category
)
{
dispatch
(
setActivityFilters
({
filters
:
{
category
:
router
.
query
.
category
,
subCategories
:
[]
}
}));
}
},
[]);
useEffect
(()
=>
{
const
handleResize
=
()
=>
{
...
...
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