import React from "react" import { DropdownButton, MenuItem } from "react-bootstrap" import RefreshIndicator from "./refresh" export default function SubtitlesButton(props) { const btnSize = props.xs ? "xsmall" : "small"; const subtitles = props.subtitles; const hasSubtitles = !(subtitles === undefined || subtitles === null || subtitles.size === 0); return ( {hasSubtitles && } {hasSubtitles && subtitles.toIndexedSeq().map(function(subtitle, index) { return (  {subtitle.get("language").split("_")[1]} ); })} ); } class RefreshButton extends React.PureComponent { constructor(props) { super(props); this.handleClick = this.handleClick.bind(this); } handleClick(e) { e.preventDefault(); if (this.props.fetching) { return } this.props.refreshSubtitles(this.props.type, this.props.resourceID, this.props.season, this.props.episode); } render() { return ( ); } }