blob: 17e4291522bdccc2150d7752159cf52a82f7c944 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
import { useSystemTasks } from "@/apis/hooks";
import { Toolbox } from "@/components";
import { QueryOverlay } from "@/components/async";
import { faSync } from "@fortawesome/free-solid-svg-icons";
import { Container } from "@mantine/core";
import { useDocumentTitle } from "@mantine/hooks";
import { FunctionComponent } from "react";
import Table from "./table";
const SystemTasksView: FunctionComponent = () => {
const tasks = useSystemTasks();
const { isFetching, data, refetch } = tasks;
useDocumentTitle("Tasks - Bazarr (System)");
return (
<QueryOverlay result={tasks}>
<Container fluid px={0}>
<Toolbox>
<Toolbox.Button
loading={isFetching}
icon={faSync}
onClick={() => refetch()}
>
Refresh
</Toolbox.Button>
</Toolbox>
<Table tasks={data ?? []}></Table>
</Container>
</QueryOverlay>
);
};
export default SystemTasksView;
|