Remove formatPreferredWordScore

pull/8827/head
Bogdan 1 year ago
parent 6ad9ebb19e
commit 7bb9250877

@ -10,7 +10,7 @@ import MovieFormats from 'Movie/MovieFormats';
import MovieLanguage from 'Movie/MovieLanguage';
import MovieQuality from 'Movie/MovieQuality';
import MovieTitleLink from 'Movie/MovieTitleLink';
import formatPreferredWordScore from 'Utilities/Number/formatPreferredWordScore';
import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
import HistoryDetailsModal from './Details/HistoryDetailsModal';
import HistoryEventTypeCell from './HistoryEventTypeCell';
import styles from './HistoryRow.css';
@ -178,7 +178,7 @@ class HistoryRow extends Component {
className={styles.customFormatScore}
>
<Tooltip
anchor={formatPreferredWordScore(
anchor={formatCustomFormatScore(
customFormatScore,
customFormats.length
)}

@ -16,7 +16,7 @@ import MovieLanguage from 'Movie/MovieLanguage';
import MovieQuality from 'Movie/MovieQuality';
import MovieTitleLink from 'Movie/MovieTitleLink';
import formatBytes from 'Utilities/Number/formatBytes';
import formatPreferredWordScore from 'Utilities/Number/formatPreferredWordScore';
import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
import translate from 'Utilities/String/translate';
import QueueStatusCell from './QueueStatusCell';
import RemoveQueueItemModal from './RemoveQueueItemModal';
@ -211,7 +211,7 @@ class QueueRow extends Component {
className={styles.customFormatScore}
>
<Tooltip
anchor={formatPreferredWordScore(
anchor={formatCustomFormatScore(
customFormatScore,
customFormats.length
)}

@ -1,16 +0,0 @@
function formatPreferredWordScore(input, customFormatsLength = 0) {
const score = Number(input);
if (score > 0) {
return `+${score}`;
}
if (score < 0) {
return score;
}
return customFormatsLength > 0 ? '+0' : '';
}
export default formatPreferredWordScore;
Loading…
Cancel
Save