import React from 'react'; import { PropTypes } from 'prop-types'; import './style.scss'; const SearchResults = (props) => { if (!props.data) { return
Loading...
; } // sort array alphabetically const sortedInterviews = props.data.sort((a, b) => a.name.localeCompare(b.name)); return (
); }; SearchResults.propTypes = { data: PropTypes.arrayOf(PropTypes.shape({})).isRequired, toggleSingleInterview: PropTypes.func.isRequired, }; export default SearchResults;