mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
added icons for noserver or no files
This commit is contained in:
30
web/src/components/TorrentList/index.jsx
Normal file
30
web/src/components/TorrentList/index.jsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import TorrentCard from 'components/TorrentCard'
|
||||
import CircularProgress from '@material-ui/core/CircularProgress'
|
||||
import { TorrentListWrapper, CenteredGrid } from 'components/App/style'
|
||||
|
||||
import NoServerConnection from './NoServerConnection'
|
||||
import AddFirstTorrent from './AddFirstTorrent'
|
||||
|
||||
export default function TorrentList({ isOffline, isLoading, torrents }) {
|
||||
if (isLoading || isOffline || !torrents.length) {
|
||||
return (
|
||||
<CenteredGrid>
|
||||
{isOffline ? (
|
||||
<NoServerConnection />
|
||||
) : isLoading ? (
|
||||
<CircularProgress />
|
||||
) : (
|
||||
!torrents.length && <AddFirstTorrent />
|
||||
)}
|
||||
</CenteredGrid>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<TorrentListWrapper>
|
||||
{torrents.map(torrent => (
|
||||
<TorrentCard key={torrent.hash} torrent={torrent} />
|
||||
))}
|
||||
</TorrentListWrapper>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user