They've changed their default settings, this changes a lot of stuff in our code base.
34 lines
819 B
JavaScript
34 lines
819 B
JavaScript
import React from "react";
|
|
import PropTypes from "prop-types";
|
|
import { List } from "immutable";
|
|
import { connect } from "react-redux";
|
|
|
|
import { getMovieDetails } from "../../actions/movies";
|
|
import { TorrentsButton } from "../buttons/torrents";
|
|
|
|
const movieTorrentsButton = ({
|
|
torrents,
|
|
imdbId,
|
|
title,
|
|
searching,
|
|
getMovieDetails,
|
|
}) => (
|
|
<TorrentsButton
|
|
torrents={torrents}
|
|
searching={searching}
|
|
search={() => getMovieDetails(imdbId)}
|
|
url={`#/torrents/search/movies/${encodeURI(title)}`}
|
|
/>
|
|
);
|
|
movieTorrentsButton.propTypes = {
|
|
torrents: PropTypes.instanceOf(List),
|
|
imdbId: PropTypes.string,
|
|
title: PropTypes.string,
|
|
searching: PropTypes.bool,
|
|
getMovieDetails: PropTypes.func,
|
|
};
|
|
|
|
export const MovieTorrentsButton = connect(null, { getMovieDetails })(
|
|
movieTorrentsButton
|
|
);
|