BenMusch/nu-tab

View on GitHub
client/app/components/schools/SchoolList.js

Summary

Maintainability
A
2 hrs
Test Coverage
import React from 'react'
import {SchoolItem} from './SchoolItem'
 
Similar blocks of code found in 2 locations. Consider refactoring.
export const SchoolList = (props) => {
return (
<ul className="schools">
{props.schools.map((school) => {
return <SchoolItem {...school} key={school.id} />
})}
</ul>
)
}
 
SchoolList.propTypes = {
schools: React.PropTypes.array.isRequired
}
 
SchoolList.defaultProps = {
schools: []
}