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 de99cb72
authored
2024-06-18 11:46:59 +0530
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
.
1 parent
2f53fef8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
36 deletions
components/home/BrowseExperiences.js
components/home/Home.js
components/home/LetDiscover.js
components/listing/Listing.js
pages/index.js
pages/listing.js
components/home/BrowseExperiences.js
View file @
de99cb7
...
...
@@ -15,6 +15,7 @@ import { cleanImage } from "../../services/imageHandling.js";
import
{
useRouter
}
from
"next/router.js"
;
import
WishlistComponent
from
"../detail/WIshlistComponent.js"
;
import
{
useSelector
}
from
"react-redux"
;
import
Link
from
"next/link.js"
;
const
BrowseExperiences
=
({
allActivitiesData
})
=>
{
const
{
endUser
}
=
useSelector
(
state
=>
state
.
endUser
);
...
...
@@ -34,14 +35,16 @@ const BrowseExperiences = ({ allActivitiesData }) => {
<
/div
>
<
/motion.div
>
<
div
className
=
"view-all-btn"
>
<
Button
variant
=
"primary"
onClick
=
{()
=>
{
router
.
push
(
"/listing"
);
}}
>
View
All
<
/Button
>
<
Link
href
=
{
"/listing"
}
prefetch
=
{
true
}
>
<
Button
variant
=
"primary"
// onClick={() => {
// router.push("/listing");
// }}
>
View
All
<
/Button
>
<
/Link
>
<
/div
>
<
/div
>
<
/div
>
...
...
@@ -115,14 +118,16 @@ const BrowseExperiences = ({ allActivitiesData }) => {
<div className="">Includes taxes & Fees</div>
</div>
<div className="
explore
-
now
">
<Button
onClick={() => {
router.push(`/activities/${data.id}`);
}}
variant="
primary
"
>
Explore Now
</Button>
<Link href={`/activities/${data.id}`}>
<Button
// onClick={() => {
// router.push(`/activities/${data.id}`);
// }}
variant="
primary
"
>
Explore Now
</Button>
</Link>
</div>
</div>
</div>
...
...
components/home/Home.js
View file @
de99cb7
import
React
,
{
Fragment
,
useEffect
}
from
"react"
;
import
Banner
from
"./Banner"
;
import
SearchBar
from
"./SearchBar"
;
import
LetDiscover
from
"./LetDiscover"
;
import
BrowseExperiences
from
"./BrowseExperiences"
;
import
GiftAnExperience
from
"./GiftAnExperience"
;
import
Testimonial
from
"./Testimonial"
;
import
SignUpToExperienceOurPlatform
from
"./SignUpToExperienceOurPlatform"
;
//
import Banner from "./Banner";
//
import SearchBar from "./SearchBar";
//
import LetDiscover from "./LetDiscover";
//
import BrowseExperiences from "./BrowseExperiences";
//
import GiftAnExperience from "./GiftAnExperience";
//
import Testimonial from "./Testimonial";
//
import SignUpToExperienceOurPlatform from "./SignUpToExperienceOurPlatform";
import
{
useDispatch
,
useSelector
}
from
"react-redux"
;
import
dynamic
from
"next/dynamic"
;
const
Banner
=
dynamic
(()
=>
import
(
"./Banner"
));
const
SearchBar
=
dynamic
(()
=>
import
(
"./SearchBar"
));
const
LetDiscover
=
dynamic
(()
=>
import
(
"./LetDiscover"
));
const
BrowseExperiences
=
dynamic
(()
=>
import
(
"./BrowseExperiences"
));
const
GiftAnExperience
=
dynamic
(()
=>
import
(
"./GiftAnExperience"
));
const
Testimonial
=
dynamic
(()
=>
import
(
"./Testimonial"
));
const
SignUpToExperienceOurPlatform
=
dynamic
(()
=>
import
(
"./SignUpToExperienceOurPlatform"
));
const
Home
=
()
=>
{
const
{
categories
}
=
useSelector
(
state
=>
state
.
categories
);
...
...
components/home/LetDiscover.js
View file @
de99cb7
...
...
@@ -33,7 +33,7 @@ const LetDiscover = ({ categories }) => {
<
/div
>
<
/motion.div
>
<
div
className
=
"view-all-btn"
>
<
Link
href
=
{
"/listing"
}
>
<
Link
href
=
{
"/listing"
}
prefetch
=
{
true
}
>
<
Button
// onClick={() => {
// router.push("/listing");
...
...
components/listing/Listing.js
View file @
de99cb7
import
React
,
{
Fragment
,
useEffect
}
from
"react"
;
import
ListingInner
from
"./ListingInner"
;
import
SignUpToExperienceOurPlatform
from
"../home/SignUpToExperienceOurPlatform"
;
import
LetDiscover
from
"./LetDiscover"
;
//
import ListingInner from "./ListingInner";
//
import SignUpToExperienceOurPlatform from "../home/SignUpToExperienceOurPlatform";
//
import LetDiscover from "./LetDiscover";
import
{
useSelector
}
from
"react-redux"
;
import
dynamic
from
"next/dynamic"
;
const
LetDiscover
=
dynamic
(()
=>
import
(
"./LetDiscover"
));
const
ListingInner
=
dynamic
(()
=>
import
(
"./ListingInner"
));
const
SignUpToExperienceOurPlatform
=
dynamic
(()
=>
import
(
"../home/SignUpToExperienceOurPlatform"
));
const
Listing
=
()
=>
{
const
{
allActivitiesData
,
loading
,
totalCount
}
=
useSelector
(
sate
=>
sate
.
allActivitiesData
);
const
{
categories
}
=
useSelector
(
sate
=>
sate
.
categories
);
const
{
subCategories
}
=
useSelector
(
sate
=>
sate
.
subCategories
);
console
.
log
(
"allActivitiesData >>>> 123"
,
allActivitiesData
);
return
(
<
Fragment
>
<
main
>
<
LetDiscover
categories
=
{
categories
}
subCategories
=
{
subCategories
}
/
>
<
LetDiscover
categories
=
{
categories
}
subCategories
=
{
subCategories
}
/
>
<
ListingInner
allActivitiesData
=
{
allActivitiesData
}
loading
=
{
loading
}
totalCount
=
{
totalCount
}
/
>
<
SignUpToExperienceOurPlatform
/>
<
/main
>
...
...
pages/index.js
View file @
de99cb7
...
...
@@ -7,6 +7,7 @@ import { getTestimonial } from "../redux/actions/testimonialAction";
import
{
loadUser
}
from
"../redux/actions/userActions"
;
import
{
wrapper
}
from
"../redux/store"
;
export
default
function
IndexPage
()
{
/** Client side rendering, traditional API call. */
// const dispatch = useDispatch();
...
...
pages/listing.js
View file @
de99cb7
import
{
useRouter
}
from
"next/router"
;
import
{
useEffect
}
from
"react"
;
import
{
useDispatch
}
from
"react-redux"
;
import
Layout
from
"../components/layout/Layout"
;
import
Listing
from
"../components/listing/Listing"
;
//
import Listing from "../components/listing/Listing";
import
{
getActivitiesByFilters
}
from
"../redux/actions/activityAction"
;
import
{
getAllCategories
,
get
AllSubCategories
,
get
SubCategoriesByCategoryId
}
from
"../redux/actions/categoriesAction"
;
import
{
getAllCategories
,
getSubCategoriesByCategoryId
}
from
"../redux/actions/categoriesAction"
;
import
{
wrapper
}
from
"../redux/store"
;
import
dynamic
from
"next/dynamic"
;
const
Listing
=
dynamic
(()
=>
import
(
"../components/listing/Listing"
));
export
default
function
ListingPage
()
{
/** Client side rendering, traditional API call. */
const
router
=
useRouter
();
const
dispatch
=
useDispatch
();
// useEffect(() => {
// dispatch(getActivitiesByFilters({ currentPage: router.query.page }));
// }, []);
...
...
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