add EmptyView to DownloadQueue, refactro strings (#53)

* Added the Emty view message in the /download path

* Changed a few expression to template string
This commit is contained in:
abhijeetChawla
2021-10-29 17:51:10 +05:30
committed by GitHub
parent e9236f3a61
commit c91cc508f4
4 changed files with 11 additions and 21 deletions

View File

@@ -24,6 +24,7 @@ import DragHandleIcon from '@mui/icons-material/DragHandle';
import ListItem from '@mui/material/ListItem';
import { ListItemIcon } from '@mui/material';
import ListItemText from '@mui/material/ListItemText';
import EmptyView from 'components/EmptyView';
const baseWebsocketUrl = JSON.parse(window.localStorage.getItem('serverBaseURL')!).replace('http', 'ws');
@@ -91,6 +92,10 @@ export default function DownloadQueue() {
const onDragEnd = (result: DropResult) => {
};
if (queue.length === 0) {
return <EmptyView message="No downloads" />;
}
return (
<>
<DragDropContext onDragEnd={onDragEnd}>