remove no-unused-vars from others too

This commit is contained in:
nikk gitanes
2021-06-06 20:37:02 +03:00
parent c03123fdc5
commit 4fdc6ddc5b
9 changed files with 8 additions and 15 deletions

View File

@@ -10,9 +10,8 @@ const useStyles = makeStyles(theme => ({
}))
export default function DialogHeader({ title, onClose, onBack }) {
const classes = useStyles()
// eslint-disable-next-line no-unused-vars
const { t } = useTranslation()
const classes = useStyles()
return (
<AppBar className={classes.appBar}>

View File

@@ -12,14 +12,13 @@ const { memo } = require('react')
const Table = memo(
({ playableFileList, viewedFileList, selectedSeason, seasonAmount, hash }) => {
const { t } = useTranslation()
const preloadBuffer = fileId => fetch(`${streamHost()}?link=${hash}&index=${fileId}&preload`)
const getFileLink = (path, id) =>
`${streamHost()}/${encodeURIComponent(path.split('\\').pop().split('/').pop())}?link=${hash}&index=${id}&play`
const fileHasEpisodeText = !!playableFileList?.find(({ path }) => ptt.parse(path).episode)
const fileHasSeasonText = !!playableFileList?.find(({ path }) => ptt.parse(path).season)
const fileHasResolutionText = !!playableFileList?.find(({ path }) => ptt.parse(path).resolution)
// eslint-disable-next-line no-unused-vars
const { t } = useTranslation()
return !playableFileList?.length ? (
'No playable files in this torrent'

View File

@@ -11,6 +11,7 @@ import { SectionSubName } from '../style'
const TorrentFunctions = memo(
({ hash, viewedFileList, playableFileList, name, title, setViewedFileList }) => {
const { t } = useTranslation()
const latestViewedFileId = viewedFileList?.[viewedFileList?.length - 1]
const latestViewedFile = playableFileList?.find(({ id }) => id === latestViewedFileId)?.path
const isOnlyOnePlayableFile = playableFileList?.length === 1
@@ -20,8 +21,6 @@ const TorrentFunctions = memo(
axios.post(viewedHost(), { action: 'rem', hash, file_index: -1 }).then(() => setViewedFileList())
const fullPlaylistLink = `${playlistTorrHost()}/${encodeURIComponent(name || title || 'file')}.m3u?link=${hash}&m3u`
const partialPlaylistLink = `${fullPlaylistLink}&fromlast`
// eslint-disable-next-line no-unused-vars
const { t } = useTranslation()
return (
<>

View File

@@ -38,6 +38,7 @@ const Loader = () => (
)
export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
const { t } = useTranslation()
const [isLoading, setIsLoading] = useState(true)
const [isDetailedCacheView, setIsDetailedCacheView] = useState(false)
const [viewedFileList, setViewedFileList] = useState()
@@ -45,9 +46,6 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
const [seasonAmount, setSeasonAmount] = useState(null)
const [selectedSeason, setSelectedSeason] = useState()
// eslint-disable-next-line no-unused-vars
const { t } = useTranslation()
const {
poster,
hash,