From 35045860c11bc4d862bea8bc25688b9e0f70a71f Mon Sep 17 00:00:00 2001 From: Carter Date: Thu, 13 Feb 2025 11:31:57 -0600 Subject: [PATCH] setting groupID to 0 to avoid undefined error --- src/device/DeviceOverview.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/device/DeviceOverview.tsx b/src/device/DeviceOverview.tsx index 76fa12e..d4c84c3 100644 --- a/src/device/DeviceOverview.tsx +++ b/src/device/DeviceOverview.tsx @@ -78,7 +78,8 @@ export default function DeviceOverview(props: Props) { }, [components, prevComponents]); const pathToDevice = () => { - const groupID = parseInt(useParams().groupID ?? "", 10); + const groupID = parseInt(useParams().groupID ?? "0", 10); + console.log(groupID) // const groupID: number = parseInt(match.params.groupID, 10); const groupPath: string = groupID > 0 ? "/groups/" + groupID.toString() : ""; const devicePath: string = "/devices/" + device.settings.deviceId.toString();