eslint fixes
This commit is contained in:
parent
ec3e09c578
commit
4cc420eb63
3 changed files with 4 additions and 9 deletions
|
@ -31,7 +31,7 @@ class Info extends Component {
|
||||||
|
|
||||||
let firstFiveLinks = []
|
let firstFiveLinks = []
|
||||||
let extraLinks = []
|
let extraLinks = []
|
||||||
for (let i = 0; i < inmapsArray.length; i ++) {
|
for (let i = 0; i < inmapsArray.length; i++) {
|
||||||
if (i < 5) {
|
if (i < 5) {
|
||||||
firstFiveLinks.push({ mapName: inmapsArray[i], mapId: inmapsLinks[i] })
|
firstFiveLinks.push({ mapName: inmapsArray[i], mapId: inmapsLinks[i] })
|
||||||
} else {
|
} else {
|
||||||
|
@ -98,7 +98,7 @@ class Info extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
Info.propTypes = {
|
Info.propTypes = {
|
||||||
topic: PropTypes.object, // backbone object
|
topic: PropTypes.object // backbone object
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Info
|
export default Info
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/* global $ */
|
/* global $ */
|
||||||
|
|
||||||
import React, { PropTypes, Component } from 'react'
|
import React, { PropTypes, Component } from 'react'
|
||||||
import { Link } from 'react-router'
|
|
||||||
|
|
||||||
import MetacodeSelect from '../MetacodeSelect'
|
import MetacodeSelect from '../MetacodeSelect'
|
||||||
import Permission from './Permission'
|
import Permission from './Permission'
|
||||||
|
@ -55,7 +54,7 @@ class Links extends Component {
|
||||||
>
|
>
|
||||||
<MetacodeSelect onMetacodeSelect={this.handleMetacodeSelect} metacodeSets={this.props.metacodeSets} />
|
<MetacodeSelect onMetacodeSelect={this.handleMetacodeSelect} metacodeSets={this.props.metacodeSets} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Follow ActiveMapper={ActiveMapper} isFollowing={isFollowing} onTopicFollow={wrappedTopicFollow} />
|
<Follow ActiveMapper={ActiveMapper} isFollowing={isFollowing} onTopicFollow={wrappedTopicFollow} />
|
||||||
<Permission
|
<Permission
|
||||||
permission={topic.get('permission')}
|
permission={topic.get('permission')}
|
||||||
|
|
|
@ -8,7 +8,6 @@ import Attachments from './Attachments'
|
||||||
import Info from './Info'
|
import Info from './Info'
|
||||||
|
|
||||||
class ReactTopicCard extends Component {
|
class ReactTopicCard extends Component {
|
||||||
|
|
||||||
render = () => {
|
render = () => {
|
||||||
const { currentUser, onTopicFollow, updateTopic } = this.props
|
const { currentUser, onTopicFollow, updateTopic } = this.props
|
||||||
const topic = this.props.openTopic
|
const topic = this.props.openTopic
|
||||||
|
@ -16,10 +15,8 @@ class ReactTopicCard extends Component {
|
||||||
if (!topic) return null
|
if (!topic) return null
|
||||||
|
|
||||||
const wrappedUpdateTopic = obj => updateTopic(topic, obj)
|
const wrappedUpdateTopic = obj => updateTopic(topic, obj)
|
||||||
const wrappedTopicFollow = () => onTopicFollow(topic)
|
|
||||||
|
|
||||||
const authorizedToEdit = topic.authorizeToEdit(currentUser)
|
const authorizedToEdit = topic.authorizeToEdit(currentUser)
|
||||||
const isFollowing = topic.isFollowedBy(currentUser)
|
|
||||||
const hasAttachment = topic.get('link') && topic.get('link') !== ''
|
const hasAttachment = topic.get('link') && topic.get('link') !== ''
|
||||||
|
|
||||||
let classname = 'permission'
|
let classname = 'permission'
|
||||||
|
@ -54,7 +51,7 @@ class ReactTopicCard extends Component {
|
||||||
authorizedToEdit={authorizedToEdit}
|
authorizedToEdit={authorizedToEdit}
|
||||||
updateTopic={wrappedUpdateTopic}
|
updateTopic={wrappedUpdateTopic}
|
||||||
/>
|
/>
|
||||||
<Info topic={topic} />
|
<Info topic={topic} />
|
||||||
<div className="clearfloat"></div>
|
<div className="clearfloat"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -64,7 +61,6 @@ class ReactTopicCard extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
ReactTopicCard.propTypes = {
|
ReactTopicCard.propTypes = {
|
||||||
openTopic: PropTypes.object,
|
openTopic: PropTypes.object,
|
||||||
currentUser: PropTypes.object,
|
currentUser: PropTypes.object,
|
||||||
|
|
Loading…
Add table
Reference in a new issue