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