Skip to content
Snippets Groups Projects
Commit 42ace9e9 authored by john's avatar john
Browse files

minor cleanup

parent f5e4b0b5
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ import { Link } from 'react-router'
import RemoveBookModal from './RemoveBookModal'
import styles from './dashboard.local.scss'
// TODO -- Book and Chapter should both extend a common component
class Book extends React.Component {
constructor (props) {
super(props)
......@@ -35,6 +36,7 @@ class Book extends React.Component {
)
}
// TODO -- edit, rename and remove should be reusable components
renderEdit () {
const { book } = this.props
......
......@@ -2,7 +2,6 @@ import Actions from 'pubsweet-client/src/actions'
import React from 'react'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
// import { Link } from 'react-router'
import AddBook from './AddBook'
import BookList from './BookList'
......
......@@ -39,10 +39,15 @@ export class BookBuilderModal extends React.Component {
renderFooter () {
const { successAction, successText, toggle } = this.props
const success = successAction ? <a className='modal-button bb-modal-act'
onClick={this.performAction}>
{ successText }
</a> : null
const successButton = (
<a
className='modal-button bb-modal-act'
onClick={this.performAction}>
{ successText }
</a>
)
const success = successAction ? successButton : null
return (
<Modal.Footer>
......@@ -53,7 +58,7 @@ export class BookBuilderModal extends React.Component {
Cancel
</a>
{success}
{ success }
</div>
</Modal.Footer>
......
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