1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-26 09:37:25 +00:00

Fixed episodes manual search button not disabled when no languages profile is selected.

This commit is contained in:
morpheus65535 2021-04-29 23:18:07 -04:00
parent be9dcbaf1f
commit cc17e8144f

View file

@ -9,6 +9,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import React, { FunctionComponent, useCallback, useMemo } from "react";
import { Badge, ButtonGroup } from "react-bootstrap";
import { Column, TableOptions, TableUpdater } from "react-table";
import { useSerieBy } from "../../@redux/hooks";
import { ProvidersApi } from "../../apis";
import {
ActionButton,
@ -131,10 +132,13 @@ const Table: FunctionComponent<Props> = ({ episodes, update }) => {
Header: "Actions",
accessor: "sonarrEpisodeId",
Cell: ({ row, externalUpdate }) => {
const [serie] = useSerieBy(row.original.sonarrSeriesId);
return (
<ButtonGroup>
<ActionButton
icon={faUser}
disabled={serie.data?.profileId === null}
onClick={() => {
externalUpdate && externalUpdate(row, "manual-search");
}}