diff --git a/src/app/(main)/gear/page.tsx b/src/app/(main)/gear/page.tsx index 439944f..069a29d 100644 --- a/src/app/(main)/gear/page.tsx +++ b/src/app/(main)/gear/page.tsx @@ -1,21 +1,16 @@ "use client" -import { Card, CardBody, CardHeader, CardIcon, CardTool } from "@/components/window/Card" +import { + Card, + CardBody, + CardHeader, + CardIcon, + CardTool, +} from "@/components/window/Card" import { ToolButton } from "@/components/window/ToolButton" import { Chip } from "@heroui/react" -import { SettingConfig, Refresh, UploadOne, HardDisk } from "@icon-park/react" -import { useState, useEffect } from "react" -import { - allSysInfo, - memoryInfo, - cpuInfo, - AllSystemInfo, - StaticInfo, - MemoryInfo, - CpuInfo, - Batteries, - batteries, - staticInfo, -} from "tauri-plugin-system-info-api" +import { Refresh, SettingConfig } from "@icon-park/react" +import { useEffect, useState } from "react" +import { type AllSystemInfo, allSysInfo } from "tauri-plugin-system-info-api" export default function Page() { return ( @@ -59,7 +54,7 @@ function HardwareInfo() { // console.log(await batteries()) } - fetchData() + void fetchData() }, []) return ( @@ -70,8 +65,9 @@ function HardwareInfo() { 系统: {allSysData?.name} {allSysData?.os_version} - 内存:{allSysData?.total_memory && - (allSysData?.total_memory / 1024 / 1024 / 1024).toFixed(0) + "GB"} + 内存: + {allSysData?.total_memory && + `${(allSysData.total_memory / 1024 / 1024 / 1024).toFixed(0)}GB`} ) diff --git a/src/components/window/Card.tsx b/src/components/window/Card.tsx index 9f7c198..bab340f 100644 --- a/src/components/window/Card.tsx +++ b/src/components/window/Card.tsx @@ -21,7 +21,9 @@ const Card = ({ children }: CardProps) => { const CardHeader = ({ children }: CardProps) => { return ( -
{children}
+
+ {children} +
) }