Fix changing settings.

This commit is contained in:
Sacha Weatherstone
2021-06-16 12:28:14 +10:00
parent 339143ef7f
commit 842d8aa31d
6 changed files with 39 additions and 17 deletions
+8 -1
View File
@@ -1,5 +1,11 @@
import React from 'react';
import type {
IBLEConnection,
IHTTPConnection,
ISerialConnection,
} from '@meshtastic/meshtasticjs';
import Channels from './Sidebar/Channels/Index';
import Device from './Sidebar/Device/Index';
import Nodes from './Sidebar/Nodes/Index';
@@ -10,6 +16,7 @@ interface SidebarProps {
sidebarOpen: boolean;
darkmode: boolean;
setDarkmode: React.Dispatch<React.SetStateAction<boolean>>;
connection: ISerialConnection | IHTTPConnection | IBLEConnection;
}
const Sidebar = (props: SidebarProps): JSX.Element => {
@@ -20,7 +27,7 @@ const Sidebar = (props: SidebarProps): JSX.Element => {
} flex-col rounded-md md:ml-0 shadow-md border w-full max-w-sm`}
>
<Nodes myId={props.myId} />
<Device />
<Device connection={props.connection} />
<Channels />
<div className="flex-grow border-b"></div>
<UI darkmode={props.darkmode} setDarkmode={props.setDarkmode} />