Renames in Frontend

This commit is contained in:
Qstick
2020-05-15 23:32:52 -04:00
committed by ta264
parent ee4e44b81a
commit ee43ccf620
387 changed files with 4036 additions and 4364 deletions
@@ -0,0 +1,62 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { push } from 'connected-react-router';
import createBookSelector from 'Store/Selectors/createBookSelector';
import { deleteBook } from 'Store/Actions/bookActions';
import DeleteBookModalContent from './DeleteBookModalContent';
function createMapStateToProps() {
return createSelector(
createBookSelector(),
(book) => {
return book;
}
);
}
const mapDispatchToProps = {
push,
deleteBook
};
class DeleteBookModalContentConnector extends Component {
//
// Listeners
onDeletePress = (deleteFiles, addImportListExclusion) => {
this.props.deleteBook({
id: this.props.bookId,
deleteFiles,
addImportListExclusion
});
this.props.onModalClose(true);
this.props.push(`${window.Readarr.urlBase}/author/${this.props.titleSlug}`);
}
//
// Render
render() {
return (
<DeleteBookModalContent
{...this.props}
onDeletePress={this.onDeletePress}
/>
);
}
}
DeleteBookModalContentConnector.propTypes = {
bookId: PropTypes.number.isRequired,
titleSlug: PropTypes.string.isRequired,
push: PropTypes.func.isRequired,
onModalClose: PropTypes.func.isRequired,
deleteBook: PropTypes.func.isRequired
};
export default connect(createMapStateToProps, mapDispatchToProps)(DeleteBookModalContentConnector);