[fix] building errors
This commit is contained in:
@@ -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 (
|
||||
<Card className="h-full">
|
||||
@@ -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}
|
||||
</Chip>
|
||||
<Chip>
|
||||
内存:{allSysData?.total_memory &&
|
||||
(allSysData?.total_memory / 1024 / 1024 / 1024).toFixed(0) + "GB"}
|
||||
内存:
|
||||
{allSysData?.total_memory &&
|
||||
`${(allSysData.total_memory / 1024 / 1024 / 1024).toFixed(0)}GB`}
|
||||
</Chip>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -21,7 +21,9 @@ const Card = ({ children }: CardProps) => {
|
||||
|
||||
const CardHeader = ({ children }: CardProps) => {
|
||||
return (
|
||||
<div className="flex items-center gap-1.5 tracking-wide select-none">{children}</div>
|
||||
<div className="flex items-center gap-1.5 tracking-wide select-none">
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user