Compare commits

..

1 Commits

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

View File

@ -14,10 +14,9 @@ import { Runtime } from "../details/runtime";
import { Title } from "../details/title"; import { Title } from "../details/title";
const ListDetails = (props) => { const ListDetails = (props) => {
if (!props.data || Object.keys(props.data).length === 0) { if (props.data === undefined) {
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 = new Map(); let selectedShow = Map();
if (selectedImdbId !== "") { if (selectedImdbId !== "") {
selectedShow = shows.get(selectedImdbId); selectedShow = shows.get(selectedImdbId);
} }