mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
remove unneded no-unused-vars
This commit is contained in:
@@ -19,7 +19,6 @@ import { useTranslation } from 'react-i18next'
|
|||||||
import { AppSidebarStyle } from './style'
|
import { AppSidebarStyle } from './style'
|
||||||
|
|
||||||
export default function Sidebar({ isDrawerOpen, setIsDonationDialogOpen }) {
|
export default function Sidebar({ isDrawerOpen, setIsDonationDialogOpen }) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
return (
|
return (
|
||||||
<AppSidebarStyle isDrawerOpen={isDrawerOpen}>
|
<AppSidebarStyle isDrawerOpen={isDrawerOpen}>
|
||||||
|
|||||||
@@ -13,9 +13,8 @@ import { useTranslation } from 'react-i18next'
|
|||||||
import { echoHost } from 'utils/Hosts'
|
import { echoHost } from 'utils/Hosts'
|
||||||
|
|
||||||
export default function AboutDialog() {
|
export default function AboutDialog() {
|
||||||
const [open, setOpen] = useState(false)
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
const [open, setOpen] = useState(false)
|
||||||
const [torrServerVersion, setTorrServerVersion] = useState('')
|
const [torrServerVersion, setTorrServerVersion] = useState('')
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
axios.get(echoHost()).then(({ data }) => setTorrServerVersion(data))
|
axios.get(echoHost()).then(({ data }) => setTorrServerVersion(data))
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import axios from 'axios'
|
|||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
export default function AddDialog({ handleClose }) {
|
export default function AddDialog({ handleClose }) {
|
||||||
|
const { t } = useTranslation()
|
||||||
const [link, setLink] = useState('')
|
const [link, setLink] = useState('')
|
||||||
const [title, setTitle] = useState('')
|
const [title, setTitle] = useState('')
|
||||||
const [poster, setPoster] = useState('')
|
const [poster, setPoster] = useState('')
|
||||||
@@ -18,9 +19,6 @@ export default function AddDialog({ handleClose }) {
|
|||||||
const inputTitle = ({ target: { value } }) => setTitle(value)
|
const inputTitle = ({ target: { value } }) => setTitle(value)
|
||||||
const inputPoster = ({ target: { value } }) => setPoster(value)
|
const inputPoster = ({ target: { value } }) => setPoster(value)
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
const { t } = useTranslation()
|
|
||||||
|
|
||||||
const handleSave = () => {
|
const handleSave = () => {
|
||||||
axios.post(torrentsHost(), { action: 'add', link, title, poster, save_to_db: true }).finally(() => handleClose())
|
axios.post(torrentsHost(), { action: 'add', link, title, poster, save_to_db: true }).finally(() => handleClose())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,11 +8,10 @@ import { useTranslation } from 'react-i18next'
|
|||||||
import AddDialog from './AddDialog'
|
import AddDialog from './AddDialog'
|
||||||
|
|
||||||
export default function AddDialogButton() {
|
export default function AddDialogButton() {
|
||||||
|
const { t } = useTranslation()
|
||||||
const [isDialogOpen, setIsDialogOpen] = useState(false)
|
const [isDialogOpen, setIsDialogOpen] = useState(false)
|
||||||
const handleClickOpen = () => setIsDialogOpen(true)
|
const handleClickOpen = () => setIsDialogOpen(true)
|
||||||
const handleClose = () => setIsDialogOpen(false)
|
const handleClose = () => setIsDialogOpen(false)
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
const { t } = useTranslation()
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<ListItem button key='Add' onClick={handleClickOpen}>
|
<ListItem button key='Add' onClick={handleClickOpen}>
|
||||||
|
|||||||
@@ -8,12 +8,11 @@ import { TorrentListWrapper, CenteredGrid } from 'App/style'
|
|||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
export default function TorrentList() {
|
export default function TorrentList() {
|
||||||
|
const { t } = useTranslation()
|
||||||
const [torrents, setTorrents] = useState([])
|
const [torrents, setTorrents] = useState([])
|
||||||
const [isLoading, setIsLoading] = useState(true)
|
const [isLoading, setIsLoading] = useState(true)
|
||||||
const [isOffline, setIsOffline] = useState(true)
|
const [isOffline, setIsOffline] = useState(true)
|
||||||
const timerID = useRef(-1)
|
const timerID = useRef(-1)
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
const { t } = useTranslation()
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
timerID.current = setInterval(() => {
|
timerID.current = setInterval(() => {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import axios from 'axios'
|
|||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
export default function UploadDialog() {
|
export default function UploadDialog() {
|
||||||
|
const { t } = useTranslation()
|
||||||
const handleCapture = ({ target: { files } }) => {
|
const handleCapture = ({ target: { files } }) => {
|
||||||
const [file] = files
|
const [file] = files
|
||||||
const data = new FormData()
|
const data = new FormData()
|
||||||
@@ -14,8 +15,6 @@ export default function UploadDialog() {
|
|||||||
data.append('file', file)
|
data.append('file', file)
|
||||||
axios.post(torrentUploadHost(), data)
|
axios.post(torrentUploadHost(), data)
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
const { t } = useTranslation()
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<label htmlFor='raised-button-file'>
|
<label htmlFor='raised-button-file'>
|
||||||
|
|||||||
Reference in New Issue
Block a user