This commit is contained in:
Sacha Weatherstone
2021-06-15 23:15:33 +10:00
parent 7d220e2683
commit 339143ef7f
22 changed files with 161 additions and 217 deletions
+2 -18
View File
@@ -1,22 +1,11 @@
import React from 'react';
import type {
IBLEConnection,
IHTTPConnection,
ISerialConnection,
} from '@meshtastic/meshtasticjs';
import type { LanguageEnum } from '../translations/TranslationContext';
import Channels from './Sidebar/Channels/Index';
import Device from './Sidebar/Device/Index';
import Nodes from './Sidebar/Nodes/Index';
import UI from './Sidebar/UI/Index';
interface SidebarProps {
isReady: boolean;
connection: ISerialConnection | IHTTPConnection | IBLEConnection;
language: LanguageEnum;
setLanguage: React.Dispatch<React.SetStateAction<LanguageEnum>>;
myId: number;
sidebarOpen: boolean;
darkmode: boolean;
@@ -31,15 +20,10 @@ 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 isReady={props.isReady} connection={props.connection} />
<Device />
<Channels />
<div className="flex-grow border-b"></div>
<UI
language={props.language}
setLanguage={props.setLanguage}
darkmode={props.darkmode}
setDarkmode={props.setDarkmode}
/>
<UI darkmode={props.darkmode} setDarkmode={props.setDarkmode} />
</div>
);
};