Update server list

This commit is contained in:
jeffvli
2022-10-30 20:21:31 -07:00
parent 689560a7a5
commit 895356701f
9 changed files with 283 additions and 187 deletions
@@ -1,6 +1,6 @@
import { Accordion, Group } from '@mantine/core';
import { RiRefreshLine, RiRestartLine, RiServerFill } from 'react-icons/ri';
import { Button, Text } from '@/renderer/components';
import { RiServerFill } from 'react-icons/ri';
import { Text } from '@/renderer/components';
import { ServerListItem } from '@/renderer/features/servers/components/server-list-item';
import { useServerList } from '@/renderer/features/servers/queries/use-server-list';
import { Font } from '@/renderer/styles';
@@ -9,18 +9,6 @@ import { titleCase } from '@/renderer/utils';
export const ServerList = () => {
const { data: servers } = useServerList();
const handleQuickScan = (
e: React.MouseEvent<HTMLButtonElement, MouseEvent>
) => {
e.stopPropagation();
};
const handleFullScan = (
e: React.MouseEvent<HTMLButtonElement, MouseEvent>
) => {
e.stopPropagation();
};
return (
<>
<Accordion variant="separated">
@@ -31,27 +19,6 @@ export const ServerList = () => {
<Text font={Font.GOTHAM}>
{titleCase(s.type)} - {s.name}
</Text>
<Group spacing="xs">
<Button
component="div"
px={10}
role="button"
tabIndex={0}
tooltip={{ label: 'Full scan' }}
variant="subtle"
onClick={handleFullScan}
>
<RiRefreshLine color="white" size={20} />
</Button>
<Button
px={10}
tooltip={{ label: 'Quick scan' }}
variant="subtle"
onClick={handleQuickScan}
>
<RiRestartLine color="white" size={20} />
</Button>
</Group>
</Group>
</Accordion.Control>
<Accordion.Panel>