Skip to content

Commit 7f02898

Browse files
committed
fix: Proper type for device info RPC response.
1 parent 1ce4891 commit 7f02898

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/AppHeader.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@ import { call_rpc } from "@zmkfirmware/zmk-studio-ts-client";
44
import { useConnectedDeviceData } from "./rpc/useConnectedDeviceData";
55
import { useSub } from "./usePubSub";
66
import { ConnectionContext } from "./rpc/ConnectionContext";
7+
import { GetDeviceInfoResponse } from "@zmkfirmware/zmk-studio-ts-client/core";
78

89
export interface AppHeaderProps {
910
connectedDeviceLabel?: string;
1011
}
1112

12-
export const AppHeader = ({ connectedDeviceLabel }: AppHeaderProps) => {
13+
export const AppHeader = ({}: AppHeaderProps) => {
1314
const [unsaved, setUnsaved] = useConnectedDeviceData<boolean>(
1415
{ keymap: { checkUnsavedChanges: true } },
1516
(r) => r.keymap?.checkUnsavedChanges
1617
);
1718

18-
const [deviceInfo, _setDeviceInfo] = useConnectedDeviceData<boolean>(
19-
{ core: { getDeviceInfo: true } },
20-
(r) => r.core?.getDeviceInfo
21-
);
19+
const [deviceInfo, _setDeviceInfo] =
20+
useConnectedDeviceData<GetDeviceInfoResponse>(
21+
{ core: { getDeviceInfo: true } },
22+
(r) => r.core?.getDeviceInfo
23+
);
2224
const conn = useContext(ConnectionContext);
2325

2426
useSub("rpc_notification.keymap.unsavedChangesStatusChanged", (unsaved) =>

0 commit comments

Comments
 (0)