Quick cleanup

This commit is contained in:
Sacha Weatherstone
2022-12-30 17:32:47 +11:00
parent e7a5dabdc9
commit fca3719bce
10 changed files with 32 additions and 25 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ export const InfoPage = (): JSX.Element => {
const [serialLogs, setSerialLogs] = useState<string>("");
connection?.onDeviceDebugLog.subscribe((packet) => {
connection?.events.onDeviceDebugLog.subscribe((packet) => {
setSerialLogs(serialLogs + new TextDecoder().decode(packet));
});
+1 -1
View File
@@ -10,7 +10,7 @@ export const LogsPage = (): JSX.Element => {
const [logs, setLogs] = useState<Types.LogEvent[]>([]);
useEffect(() => {
connection?.onLogEvent.subscribe((log) => {
connection?.events.onLogEvent.subscribe((log) => {
setLogs([...logs, log]);
});
}, [connection, setLogs, logs]);