jotai migration (#221)

This commit is contained in:
Marco Piovanello
2024-11-12 11:31:25 +01:00
committed by GitHub
parent 4a87ea559a
commit 01c6edef74
37 changed files with 287 additions and 408 deletions

View File

@@ -1,5 +1,5 @@
import { useAtom, useAtomValue } from 'jotai'
import { useEffect } from 'react'
import { useRecoilState, useRecoilValue } from 'recoil'
import { loadingDownloadsState } from '../atoms/downloads'
import { listViewState } from '../atoms/settings'
import { loadingAtom } from '../atoms/ui'
@@ -7,10 +7,10 @@ import DownloadsGridView from './DownloadsGridView'
import DownloadsTableView from './DownloadsTableView'
const Downloads: React.FC = () => {
const tableView = useRecoilValue(listViewState)
const loadingDownloads = useRecoilValue(loadingDownloadsState)
const tableView = useAtomValue(listViewState)
const loadingDownloads = useAtomValue(loadingDownloadsState)
const [isLoading, setIsLoading] = useRecoilState(loadingAtom)
const [isLoading, setIsLoading] = useAtom(loadingAtom)
useEffect(() => {
if (loadingDownloads) {