feat(manage): add wattHours and tdpMax to DeviceFormData and DeviceItem interfaces
This commit is contained in:
@@ -20,6 +20,8 @@ interface DeviceItem {
|
|||||||
totalBenchmarks?: number
|
totalBenchmarks?: number
|
||||||
avgFps?: number | null
|
avgFps?: number | null
|
||||||
gameCount?: number
|
gameCount?: number
|
||||||
|
wattHours?: number | null
|
||||||
|
tdpMax?: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DeviceFormData {
|
interface DeviceFormData {
|
||||||
@@ -28,6 +30,8 @@ interface DeviceFormData {
|
|||||||
deviceType: "handheld" | "console"
|
deviceType: "handheld" | "console"
|
||||||
image: string
|
image: string
|
||||||
sortOrder: number
|
sortOrder: number
|
||||||
|
wattHours: string
|
||||||
|
tdpMax: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export function HardwareClient() {
|
export function HardwareClient() {
|
||||||
@@ -41,6 +45,8 @@ export function HardwareClient() {
|
|||||||
deviceType: "handheld",
|
deviceType: "handheld",
|
||||||
image: "",
|
image: "",
|
||||||
sortOrder: 0,
|
sortOrder: 0,
|
||||||
|
wattHours: "",
|
||||||
|
tdpMax: "",
|
||||||
})
|
})
|
||||||
const [saving, setSaving] = useState(false)
|
const [saving, setSaving] = useState(false)
|
||||||
const [deleting, setDeleting] = useState(false)
|
const [deleting, setDeleting] = useState(false)
|
||||||
@@ -78,6 +84,8 @@ export function HardwareClient() {
|
|||||||
deviceType: "handheld",
|
deviceType: "handheld",
|
||||||
image: "",
|
image: "",
|
||||||
sortOrder: 0,
|
sortOrder: 0,
|
||||||
|
wattHours: "",
|
||||||
|
tdpMax: "",
|
||||||
})
|
})
|
||||||
setShowModal(true)
|
setShowModal(true)
|
||||||
}
|
}
|
||||||
@@ -90,6 +98,8 @@ export function HardwareClient() {
|
|||||||
deviceType: device.deviceType as "handheld" | "console",
|
deviceType: device.deviceType as "handheld" | "console",
|
||||||
image: device.image ?? "",
|
image: device.image ?? "",
|
||||||
sortOrder: device.sortOrder,
|
sortOrder: device.sortOrder,
|
||||||
|
wattHours: device.wattHours != null ? String(device.wattHours) : "",
|
||||||
|
tdpMax: device.tdpMax != null ? String(device.tdpMax) : "",
|
||||||
})
|
})
|
||||||
setShowModal(true)
|
setShowModal(true)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user