BenMusch/nu-tab

View on GitHub
client/app/components/debaters/DebaterItem.js

Summary

Maintainability
A
1 hr
Test Coverage
import React from 'react'
import Debater from '../../resources/Debater'
 
export const DebaterItem = (props) => {
const debater = new Debater(props.id)
return (
<li><a href={debater.pathTo().show}>{props.name}</a> ({props.school.name})</li>
)
}
 
Similar blocks of code found in 2 locations. Consider refactoring.
DebaterItem.propTypes = {
name: React.PropTypes.string.isRequired,
id: React.PropTypes.number.isRequired,
school: React.PropTypes.object.isRequired
}