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 32ac1ea7
authored
2024-06-05 18:54:23 +0530
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
.
1 parent
2926a56c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
components/detail/Detail.js
components/listing/ListingItems.js
components/detail/Detail.js
View file @
32ac1ea
...
...
@@ -21,8 +21,8 @@ const Detail = () => {
const
{
faqs
}
=
useSelector
(
state
=>
state
.
faqs
);
useEffect
(()
=>
{
// console.log("router", activityById.data.attributes.category?.data?.attributes.name);
dispatch
(
getActivitiesByFilters
({
category
:
activityById
?.
data
.
attributes
.
category
?.
data
?.
id
,
currentPage
:
router
.
query
.
page
}));
},
[
activityById
,
router
]);
dispatch
(
getActivitiesByFilters
({
category
:
activityById
?.
data
.
attributes
.
category
?.
data
?.
id
}));
},
[
activityById
]);
// console.log("faqs=>", faqs);
console
.
log
(
"activityById"
,
activityById
);
...
...
components/listing/ListingItems.js
View file @
32ac1ea
import
{
Empty
}
from
"antd"
;
import
Image
from
"next/image"
;
import
{
useRouter
}
from
"next/router"
;
import
React
,
{
useState
}
from
"react"
;
import
React
,
{
use
Effect
,
use
State
}
from
"react"
;
import
{
Button
}
from
"react-bootstrap"
;
import
{
Loader
}
from
"react-bootstrap-typeahead"
;
import
{
useSelector
}
from
"react-redux"
;
import
{
use
Dispatch
,
use
Selector
}
from
"react-redux"
;
import
{
cleanImage
}
from
"../../services/imageHandling"
;
import
WishlistComponent
from
"../detail/WIshlistComponent"
;
import
Pagination
from
"react-js-pagination"
;
import
{
getActivitiesByFilters
}
from
"../../redux/actions/activityAction"
;
const
ListingItems
=
({
allActivitiesData
,
loading
,
gridClass
,
totalCount
})
=>
{
// const [gridClass, setGridClass] = useState('col-md-3');
const
{
endUser
}
=
useSelector
(
state
=>
state
.
endUser
);
console
.
log
(
"endUser"
,
endUser
);
const
router
=
useRouter
();
const
dispatch
=
useDispatch
();
useEffect
(()
=>
{
dispatch
(
getActivitiesByFilters
({
currentPage
:
router
.
query
.
page
}));
},
[
router
]);
console
.
log
(
"endUser"
,
endUser
);
// console.log("router", router);
let
{
page
=
1
,
location
=
""
}
=
router
.
query
;
page
=
Number
(
page
);
...
...
@@ -39,6 +44,7 @@ const ListingItems = ({ allActivitiesData, loading, gridClass, totalCount }) =>
});
};
console
.
log
(
"page"
,
page
);
return
(
<>
{
allActivitiesData
&&
!
allActivitiesData
.
data
.
length
==
0
?
(
...
...
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