Add edit ToolType; Users type; Reports cleanup; Type safery

This commit is contained in:
cracklesparkle
2024-12-19 17:00:11 +09:00
parent 71055e7cd0
commit 5218ee851f
7 changed files with 13 additions and 80 deletions

View File

@ -4,7 +4,7 @@ import { Card, Flex } from '@mantine/core';
function CardComponent({
url,
is_alive
}: { url: any, is_alive: any }) {
}: { url: string, is_alive: boolean }) {
return (
<Card>
<Flex p='sm' direction='column'>
@ -16,7 +16,7 @@ function CardComponent({
}
export default function MonitorPage() {
const [servers, setServers] = useState<any>([])
const [servers, setServers] = useState([])
useEffect(() => {
const eventSource = new EventSource(`${import.meta.env.VITE_API_MONITOR_URL}/watch`);
@ -39,7 +39,7 @@ export default function MonitorPage() {
return (
<div>
<Flex direction='column' gap='sm'>
{servers.length > 0 && servers.map((server: any) => (
{servers.length > 0 && servers.map((server: { name: string, status: boolean }) => (
<CardComponent url={server.name} is_alive={server.status} />
))}
</Flex>