/* eslint-disable camelcase */ import { useMovieAddBlacklist, useMovieHistoryPagination } from "@/apis/hooks"; import { MutateAction } from "@/components/async"; import { HistoryIcon } from "@/components/bazarr"; import Language from "@/components/bazarr/Language"; import TextPopover from "@/components/TextPopover"; import HistoryView from "@/pages/views/HistoryView"; import { useTableStyles } from "@/styles"; import { faFileExcel, faInfoCircle, faRecycle, } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Anchor, Badge, Text } from "@mantine/core"; import { FunctionComponent, useMemo } from "react"; import { Link } from "react-router-dom"; import { Column } from "react-table"; const MoviesHistoryView: FunctionComponent = () => { const columns: Column[] = useMemo[]>( () => [ { accessor: "action", Cell: (row) => , }, { Header: "Name", accessor: "title", Cell: ({ row, value }) => { const { classes } = useTableStyles(); const target = `/movies/${row.original.radarrId}`; return ( {value} ); }, }, { Header: "Language", accessor: "language", Cell: ({ value }) => { if (value) { return ( ); } else { return null; } }, }, { Header: "Score", accessor: "score", }, { Header: "Date", accessor: "timestamp", Cell: (row) => { if (row.value) { return ( {row.value} ); } else { return null; } }, }, { accessor: "description", Cell: ({ value }) => { return ( ); }, }, { accessor: "upgradable", Cell: (row) => { if (row.value) { return ( ); } else { return null; } }, }, { accessor: "blacklisted", Cell: ({ row, value }) => { const add = useMovieAddBlacklist(); const { radarrId, provider, subs_id, language, subtitles_path } = row.original; if (subs_id && provider && language) { return ( ({ id: radarrId, form: { provider, subs_id, subtitles_path, language: language.code2, }, })} > ); } else { return null; } }, }, ], [] ); const query = useMovieHistoryPagination(); return ( ); }; export default MoviesHistoryView;