1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-29 23:12:39 +01:00

Cleanup History Details and a typo

This commit is contained in:
Bogdan 2024-09-01 04:25:21 +03:00 committed by Mark McDowall
parent 7f0696c574
commit 66cead6b48
4 changed files with 3 additions and 18 deletions

View File

@ -27,8 +27,6 @@ interface HistoryDetailsProps {
sourceTitle: string;
data: HistoryData;
downloadId?: string;
shortDateFormat: string;
timeFormat: string;
}
function HistoryDetails(props: HistoryDetailsProps) {

View File

@ -38,8 +38,6 @@ interface HistoryDetailsModalProps {
data: HistoryData;
downloadId?: string;
isMarkingAsFailed: boolean;
shortDateFormat: string;
timeFormat: string;
onMarkAsFailedPress: () => void;
onModalClose: () => void;
}
@ -52,8 +50,6 @@ function HistoryDetailsModal(props: HistoryDetailsModalProps) {
data,
downloadId,
isMarkingAsFailed = false,
shortDateFormat,
timeFormat,
onMarkAsFailedPress,
onModalClose,
} = props;
@ -69,8 +65,6 @@ function HistoryDetailsModal(props: HistoryDetailsModalProps) {
sourceTitle={sourceTitle}
data={data}
downloadId={downloadId}
shortDateFormat={shortDateFormat}
timeFormat={timeFormat}
/>
</ModalBody>

View File

@ -1,5 +1,5 @@
import React, { useCallback, useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useDispatch } from 'react-redux';
import IconButton from 'Components/Link/IconButton';
import RelativeDateCell from 'Components/Table/Cells/RelativeDateCell';
import TableRowCell from 'Components/Table/Cells/TableRowCell';
@ -20,7 +20,6 @@ import { QualityModel } from 'Quality/Quality';
import SeriesTitleLink from 'Series/SeriesTitleLink';
import useSeries from 'Series/useSeries';
import { fetchHistory, markAsFailed } from 'Store/Actions/historyActions';
import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector';
import CustomFormat from 'typings/CustomFormat';
import { HistoryData, HistoryEventType } from 'typings/History';
import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
@ -72,10 +71,6 @@ function HistoryRow(props: HistoryRowProps) {
const series = useSeries(seriesId);
const episode = useEpisode(episodeId, 'episodes');
const { shortDateFormat, timeFormat } = useSelector(
createUISettingsSelector()
);
const [isDetailsModalOpen, setIsDetailsModalOpen] = useState(false);
const handleDetailsPress = useCallback(() => {
@ -260,8 +255,6 @@ function HistoryRow(props: HistoryRowProps) {
data={data}
downloadId={downloadId}
isMarkingAsFailed={isMarkingAsFailed}
shortDateFormat={shortDateFormat}
timeFormat={timeFormat}
onMarkAsFailedPress={handleMarkAsFailedPress}
onModalClose={handleDetailsModalClose}
/>

View File

@ -1,11 +1,11 @@
import React, { ComponentPropsWithoutRef } from 'react';
import styles from './TableRowCell.css';
export interface TableRowCellprops extends ComponentPropsWithoutRef<'td'> {}
export interface TableRowCellProps extends ComponentPropsWithoutRef<'td'> {}
export default function TableRowCell({
className = styles.cell,
...tdProps
}: TableRowCellprops) {
}: TableRowCellProps) {
return <td className={className} {...tdProps} />;
}