mirror of
https://github.com/Readarr/Readarr
synced 2026-02-04 05:42:29 +01:00
Fixed: Goodreads bookshelves not shown after authentication
This commit is contained in:
parent
93ba5ade9e
commit
64e2f6457d
2 changed files with 10 additions and 8 deletions
|
|
@ -182,7 +182,8 @@ BookshelfInput.propTypes = {
|
|||
|
||||
BookshelfInput.defaultProps = {
|
||||
className: styles.bookshelfInputWrapper,
|
||||
inputClassName: styles.input
|
||||
inputClassName: styles.input,
|
||||
isPopulated: false
|
||||
};
|
||||
|
||||
export default BookshelfInput;
|
||||
|
|
|
|||
|
|
@ -3,22 +3,22 @@ import PropTypes from 'prop-types';
|
|||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import { clearOptions, fetchOptions } from 'Store/Actions/providerOptionActions';
|
||||
import { clearOptions, defaultState, fetchOptions } from 'Store/Actions/providerOptionActions';
|
||||
import BookshelfInput from './BookshelfInput';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
(state) => state.providerOptions,
|
||||
(state) => state.providerOptions.bookshelves || defaultState,
|
||||
(state, props) => props.name,
|
||||
(state, name) => {
|
||||
(bookshelves, name) => {
|
||||
const {
|
||||
items,
|
||||
...otherState
|
||||
} = state;
|
||||
} = bookshelves;
|
||||
return ({
|
||||
helptext: items.helptext && items.helptext[name] ? items.helptext[name] : '',
|
||||
user: items.user ? items.user : '',
|
||||
items: items.shelves ? items.shelves : [],
|
||||
user: items && items.user ? items.user : '',
|
||||
items: items && items.shelves ? items.shelves : [],
|
||||
...otherState
|
||||
});
|
||||
}
|
||||
|
|
@ -50,7 +50,7 @@ class BookshelfInputConnector extends Component {
|
|||
}
|
||||
|
||||
componentWillUnmount = () => {
|
||||
this.props.dispatchClearOptions();
|
||||
this.props.dispatchClearOptions({ section: 'bookshelves' });
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -65,6 +65,7 @@ class BookshelfInputConnector extends Component {
|
|||
} = this.props;
|
||||
|
||||
dispatchFetchOptions({
|
||||
section: 'bookshelves',
|
||||
action: 'getBookshelves',
|
||||
queryParams: { name },
|
||||
provider,
|
||||
|
|
|
|||
Loading…
Reference in a new issue