diff --git a/app/components/Dashboard/Book.jsx b/app/components/Dashboard/Book.jsx index 2e0b91e5f19e263b99b97391a854ab6b1d49bd01..2a56a6066b7085a4615058f685b11583a548458f 100644 --- a/app/components/Dashboard/Book.jsx +++ b/app/components/Dashboard/Book.jsx @@ -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 diff --git a/app/components/Dashboard/Dashboard.jsx b/app/components/Dashboard/Dashboard.jsx index 0d1a1c464f68bcb6913728968a26f6fa925a33b5..42708c792a59cf9e4ffec825f968d4b00e1e397c 100644 --- a/app/components/Dashboard/Dashboard.jsx +++ b/app/components/Dashboard/Dashboard.jsx @@ -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' diff --git a/app/components/common/AbstractModal.jsx b/app/components/common/AbstractModal.jsx index 2bf9cc289dbad73b52d42490fc4409978f8749a6..ad15dd0d3a9dec442d23d129030fe02f312dce21 100644 --- a/app/components/common/AbstractModal.jsx +++ b/app/components/common/AbstractModal.jsx @@ -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>