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 React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
...@@ -56,19 +57,13 @@ const ExampleListing = ({ className }) => { ...@@ -56,19 +57,13 @@ const ExampleListing = ({ className }) => {
/> />
)} )}
{results && {results && results.items && (
results.items && <ul>
results.items.map((entry, idx) => { {results.items.map((entry, idx) => {
return ( return <li key={idx}>{entry.title}</li>;
<EventCard })}
title={entry.title} </ul>
description={entry.summary} )}
image={entry.image}
uri={entry.sys && entry.sys.uri}
key={idx}
/>
);
})}
{!results || (results.length < 1 && <p>No results found.</p>)} {!results || (results.length < 1 && <p>No results found.</p>)}
</EventsListingStyled> </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