Compare commits

..

1 Commits

Author SHA1 Message Date
4b26080193 Update redux state management
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
Use immer with native javascript objects instead of immutablejs.
2020-04-07 18:22:26 +02:00
2 changed files with 3 additions and 2 deletions

View File

@ -14,9 +14,10 @@ import { Runtime } from "../details/runtime";
import { Title } from "../details/title"; import { Title } from "../details/title";
const ListDetails = (props) => { const ListDetails = (props) => {
if (props.data === undefined) { if (!props.data || Object.keys(props.data).length === 0) {
return null; return null;
} }
if (props.loading) { if (props.loading) {
return null; return null;
} }

View File

@ -51,7 +51,7 @@ const ShowList = ({ match, history }) => {
history.push("/shows/details/" + imdbId); history.push("/shows/details/" + imdbId);
}; };
let selectedShow = Map(); let selectedShow = new Map();
if (selectedImdbId !== "") { if (selectedImdbId !== "") {
selectedShow = shows.get(selectedImdbId); selectedShow = shows.get(selectedImdbId);
} }