Commit 7c2a2bca authored by Jon Moore's avatar Jon Moore
Browse files

furhters updates to events listing example

parent 77d60733
Pipeline #39434 passed with stage
in 5 minutes and 35 seconds
/* 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>
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment