Cleanup History Details and a typo

pull/7171/head
Bogdan 6 months ago committed by Mark McDowall
parent 7f0696c574
commit 66cead6b48

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

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

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

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

Loading…
Cancel
Save