🏗️ Migrate dashdot info to tRPC

This commit is contained in:
Meier Lukas
2023-06-10 13:22:17 +02:00
parent 458fea369c
commit 05e01286d4
5 changed files with 62 additions and 48 deletions

View File

@@ -2,21 +2,13 @@ import { Group, Stack, Text } from '@mantine/core';
import { IconArrowNarrowDown, IconArrowNarrowUp } from '@tabler/icons-react';
import { useTranslation } from 'next-i18next';
import { bytes } from '../../tools/bytesHelper';
import { RouterOutputs } from '~/utils/api';
interface DashDotCompactNetworkProps {
info: DashDotInfo;
}
export interface DashDotInfo {
storage: {
size: number;
disks: { device: string; brand: string; type: string }[];
}[];
network: {
speedUp: number;
speedDown: number;
};
}
export type DashDotInfo = RouterOutputs['dashDot']['info'];
export const DashDotCompactNetwork = ({ info }: DashDotCompactNetworkProps) => {
const { t } = useTranslation('modules/dashdot');