code refactoring

This commit is contained in:
2024-04-10 12:02:04 +02:00
parent 566f0f2ac2
commit 2f02293a52
6 changed files with 16 additions and 57 deletions

View File

@@ -1,5 +1,4 @@
import { atom, selector } from 'recoil'
import { RPCResult } from '../types'
import { activeDownloadsState } from './downloads'
export const loadingAtom = atom({
@@ -7,11 +6,6 @@ export const loadingAtom = atom({
default: true
})
export const optimisticDownloadsState = atom<RPCResult[]>({
key: 'optimisticDownloadsState',
default: []
})
export const totalDownloadSpeedState = selector<number>({
key: 'totalDownloadSpeedState',
get: ({ get }) => get(activeDownloadsState)