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
+11 -2
View File
@@ -6,11 +6,20 @@ import {
ChevronDownIcon,
ChevronRightIcon,
} from '@heroicons/react/outline';
import type {
IBLEConnection,
IHTTPConnection,
ISerialConnection,
} from '@meshtastic/meshtasticjs';
import { TranslationsContext } from '../../../translations/TranslationsContext';
import Settings from './Settings';
const Device = (): JSX.Element => {
interface DeviceProps {
connection: ISerialConnection | IHTTPConnection | IBLEConnection;
}
const Device = (props: DeviceProps): JSX.Element => {
const { translations } = React.useContext(TranslationsContext);
return (
<Disclosure>
@@ -36,7 +45,7 @@ const Device = (): JSX.Element => {
</div>
}
>
<Settings />
<Settings connection={props.connection} />
</React.Suspense>
</>
</Disclosure.Panel>