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 9b78055a
authored
2024-06-06 11:26:04 +0530
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
paginationissue
1 parent
32ac1ea7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
components/listing/ListingInner.js
components/listing/ListingItems.js
components/listing/ListingInner.js
View file @
9b78055
...
...
@@ -93,7 +93,7 @@ const ListingInner = ({ allActivitiesData, loading, totalCount }) => {
if
(
activityFilters
.
priceUpperLimit
)
{
filters
[
"priceUpperLimit"
]
=
activityFilters
.
priceUpperLimit
;
}
// console.log("subcategory >>", filters
);
console
.
log
(
"router >>"
,
router
.
query
.
page
);
dispatch
(
getActivitiesByFilters
({
subCategory
:
filters
.
subCategory
,
...
...
components/listing/ListingItems.js
View file @
9b78055
...
...
@@ -15,9 +15,9 @@ const ListingItems = ({ allActivitiesData, loading, gridClass, totalCount }) =>
const
{
endUser
}
=
useSelector
(
state
=>
state
.
endUser
);
const
router
=
useRouter
();
const
dispatch
=
useDispatch
();
useEffect
(()
=>
{
dispatch
(
getActivitiesByFilters
({
currentPage
:
router
.
query
.
page
}));
},
[
router
]);
//
useEffect(() => {
//
dispatch(getActivitiesByFilters({ currentPage: router.query.page }));
//
}, [router]);
console
.
log
(
"endUser"
,
endUser
);
// console.log("router", router);
let
{
page
=
1
,
location
=
""
}
=
router
.
query
;
...
...
@@ -117,7 +117,12 @@ const ListingItems = ({ allActivitiesData, loading, gridClass, totalCount }) =>
activePage
=
{
page
}
itemsCountPerPage
=
{
12
}
totalItemsCount
=
{
totalCount
}
onChange
=
{
handlePagination
}
onChange
=
{
async
(
e
)
=>
{
console
.
log
(
e
);
await
handlePagination
(
e
);
dispatch
(
getActivitiesByFilters
({
currentPage
:
e
}));
}}
nextPageText
=
{
"›"
}
prevPageText
=
{
"‹"
}
firstPageText
=
{
"«"
}
...
...
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