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:
@@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user