|
|
|
@ -6,6 +6,7 @@ import React, {
|
|
|
|
|
useState,
|
|
|
|
|
} from 'react';
|
|
|
|
|
import { useDispatch, useSelector } from 'react-redux';
|
|
|
|
|
import { useHistory } from 'react-router';
|
|
|
|
|
import { SelectProvider } from 'App/SelectContext';
|
|
|
|
|
import ClientSideCollectionAppState from 'App/State/ClientSideCollectionAppState';
|
|
|
|
|
import MoviesAppState, { MovieIndexAppState } from 'App/State/MoviesAppState';
|
|
|
|
@ -76,6 +77,8 @@ interface MovieIndexProps {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const MovieIndex = withScrollPosition((props: MovieIndexProps) => {
|
|
|
|
|
const history = useHistory();
|
|
|
|
|
|
|
|
|
|
const {
|
|
|
|
|
isFetching,
|
|
|
|
|
isPopulated,
|
|
|
|
@ -107,7 +110,12 @@ const MovieIndex = withScrollPosition((props: MovieIndexProps) => {
|
|
|
|
|
const [isSelectMode, setIsSelectMode] = useState(false);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
dispatch(fetchMovies());
|
|
|
|
|
if (history.action === 'PUSH') {
|
|
|
|
|
dispatch(fetchMovies());
|
|
|
|
|
}
|
|
|
|
|
}, [history, dispatch]);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
dispatch(fetchQueueDetails({ all: true }));
|
|
|
|
|
}, [dispatch]);
|
|
|
|
|
|
|
|
|
|