From 66602f834440f35b623748360769598d887ff26f Mon Sep 17 00:00:00 2001 From: Daniel Shleifman Date: Tue, 15 Jun 2021 11:10:01 +0300 Subject: [PATCH] refactor --- web/src/components/TorrentList.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/components/TorrentList.jsx b/web/src/components/TorrentList.jsx index 0a4fc5f..62887aa 100644 --- a/web/src/components/TorrentList.jsx +++ b/web/src/components/TorrentList.jsx @@ -19,7 +19,7 @@ const getTorrents = async () => { export default function TorrentList() { const { t } = useTranslation() - const [isOffline, setIsOffline] = useState(true) + const [isOffline, setIsOffline] = useState(false) const { data: torrents, isLoading } = useQuery('torrents', getTorrents, { retry: 1, refetchInterval: 1000, @@ -30,10 +30,10 @@ export default function TorrentList() { if (isLoading || isOffline || !torrents.length) { return ( - {isLoading ? ( - - ) : isOffline ? ( + {isOffline ? ( {t('Offline')} + ) : isLoading ? ( + ) : ( !torrents.length && {t('NoTorrentsAdded')} )}