Skip to content

Commit

Permalink
fix: net badge error
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster1963 committed Oct 11, 2024
1 parent f8f7b51 commit dd15612
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/ServerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,19 @@ export default function ServerCard({
variant="secondary"
className="items-center justify-center rounded-[8px] text-nowrap text-[11px] border-muted-50 shadow-md shadow-neutral-200/30 dark:shadow-none"
style={{
width: `${(serverInfo.status.NetInTransfer / (serverInfo.status.NetInTransfer + serverInfo.status.NetOutTransfer)) * 100}%`,
width: `${(serverInfo.status.NetOutTransfer / (serverInfo.status.NetInTransfer + serverInfo.status.NetOutTransfer)) * 100}%`,
}}
>
{t("Upload")}:{formatBytes(serverInfo.status.NetInTransfer)}
{t("Upload")}:{formatBytes(serverInfo.status.NetOutTransfer)}
</Badge>
<Badge
variant="outline"
className="items-center justify-center rounded-[8px] text-nowrap text-[11px] shadow-md shadow-neutral-200/30 dark:shadow-none"
style={{
width: `${(serverInfo.status.NetOutTransfer / (serverInfo.status.NetInTransfer + serverInfo.status.NetOutTransfer)) * 100}%`,
width: `${(serverInfo.status.NetInTransfer / (serverInfo.status.NetInTransfer + serverInfo.status.NetOutTransfer)) * 100}%`,
}}
>
{t("Download")}:{formatBytes(serverInfo.status.NetOutTransfer)}
{t("Download")}:{formatBytes(serverInfo.status.NetInTransfer)}
</Badge>
</section>
)}
Expand Down

0 comments on commit dd15612

Please sign in to comment.