Use tmdbId instead of collection id

This commit is contained in:
john.bednarczyk 2024-01-19 16:48:16 -06:00
parent d7341aa0c1
commit 6baefe7a5c
3 changed files with 6 additions and 4 deletions

View File

@ -193,7 +193,7 @@ class CollectionOverviews extends Component {
};
scrollToItem = (itemId) => {
const index = this.props.items.findIndex((item) => item.id === itemId);
const index = this.props.items.findIndex((item) => item.tmdbId === itemId);
if (index !== -1 && this._grid) {
this._grid.scrollToCell({

View File

@ -19,7 +19,7 @@ class MovieCollectionLabel extends Component {
render() {
const {
id,
tmdbId,
title,
monitored,
onMonitorTogglePress
@ -36,7 +36,7 @@ class MovieCollectionLabel extends Component {
<Link
to={{
pathname: '/collections',
state: { navigateToId: id }
state: { navigateToId: tmdbId }
}}
className={styles.titleLink}
>
@ -51,7 +51,7 @@ MovieCollectionLabel.propTypes = {
title: PropTypes.string.isRequired,
monitored: PropTypes.bool.isRequired,
onMonitorTogglePress: PropTypes.func.isRequired,
id: PropTypes.string.isRequired
tmdbId: PropTypes.string.isRequired
};
export default MovieCollectionLabel;

View File

@ -9,11 +9,13 @@ function createUnoptimizedSelector(uiSection) {
const items = movies.items.map((s) => {
const {
id,
tmdbId,
sortTitle
} = s;
return {
id,
tmdbId,
sortTitle
};
});