mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-20 05:56:10 +05:00
fixed memory leak
This commit is contained in:
@@ -6,7 +6,7 @@ import { NoImageIcon } from 'icons'
|
||||
import { getPeerString, humanizeSize } from 'utils/Utils'
|
||||
import { viewedHost } from 'utils/Hosts'
|
||||
import { CopyToClipboard } from 'react-copy-to-clipboard'
|
||||
import { useState } from 'react'
|
||||
import { useEffect, useState } from 'react'
|
||||
|
||||
import { useUpdateCache, useCreateCacheMap } from './customHooks'
|
||||
|
||||
@@ -116,7 +116,9 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
|
||||
} = torrent
|
||||
|
||||
const cache = useUpdateCache(hash)
|
||||
const cacheMap = useCreateCacheMap(cache, () => setIsLoading(false))
|
||||
const cacheMap = useCreateCacheMap(cache)
|
||||
|
||||
useEffect(() => setIsLoading(false), [cacheMap])
|
||||
|
||||
const { Capacity, PiecesCount, PiecesLength } = cache
|
||||
|
||||
|
||||
Reference in New Issue
Block a user