Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Workshops
Developer workshop
Commits
7c2a2bca
Commit
7c2a2bca
authored
Sep 16, 2020
by
Jon Moore
Browse files
furhters updates to events listing example
parent
77d60733
Pipeline
#39434
passed with stage
in 5 minutes and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/features/eventListing/components/EventsListing.js
View file @
7c2a2bca
/* eslint-disable no-unused-vars */
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
useSelector
}
from
'
react-redux
'
;
...
...
@@ -56,19 +57,13 @@ const ExampleListing = ({ className }) => {
/
>
)}
{
results
&&
results
.
items
&&
results
.
items
.
map
((
entry
,
idx
)
=>
{
return
(
<
EventCard
title
=
{
entry
.
title
}
description
=
{
entry
.
summary
}
image
=
{
entry
.
image
}
uri
=
{
entry
.
sys
&&
entry
.
sys
.
uri
}
key
=
{
idx
}
/
>
);
})}
{
results
&&
results
.
items
&&
(
<
ul
>
{
results
.
items
.
map
((
entry
,
idx
)
=>
{
return
<
li
key
=
{
idx
}
>
{
entry
.
title
}
<
/li>
;
})}
<
/ul
>
)}
{
!
results
||
(
results
.
length
<
1
&&
<
p
>
No
results
found
.
<
/p>
)
}
<
/EventsListingStyled
>
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment