Quick cleanup
This commit is contained in:
+1
-1
@@ -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
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user