From 7f0289829f3a64854d7a44680dc1a8e1ae2c5f92 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 29 Jun 2024 00:43:18 -0600 Subject: [PATCH] fix: Proper type for device info RPC response. --- src/AppHeader.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/AppHeader.tsx b/src/AppHeader.tsx index 5342ffc..a6de0b1 100644 --- a/src/AppHeader.tsx +++ b/src/AppHeader.tsx @@ -4,21 +4,23 @@ import { call_rpc } from "@zmkfirmware/zmk-studio-ts-client"; import { useConnectedDeviceData } from "./rpc/useConnectedDeviceData"; import { useSub } from "./usePubSub"; import { ConnectionContext } from "./rpc/ConnectionContext"; +import { GetDeviceInfoResponse } from "@zmkfirmware/zmk-studio-ts-client/core"; export interface AppHeaderProps { connectedDeviceLabel?: string; } -export const AppHeader = ({ connectedDeviceLabel }: AppHeaderProps) => { +export const AppHeader = ({}: AppHeaderProps) => { const [unsaved, setUnsaved] = useConnectedDeviceData( { keymap: { checkUnsavedChanges: true } }, (r) => r.keymap?.checkUnsavedChanges ); - const [deviceInfo, _setDeviceInfo] = useConnectedDeviceData( - { core: { getDeviceInfo: true } }, - (r) => r.core?.getDeviceInfo - ); + const [deviceInfo, _setDeviceInfo] = + useConnectedDeviceData( + { core: { getDeviceInfo: true } }, + (r) => r.core?.getDeviceInfo + ); const conn = useContext(ConnectionContext); useSub("rpc_notification.keymap.unsavedChangesStatusChanged", (unsaved) =>