import React from 'react'; import { useForm } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; import { FiLink2, FiMenu, FiSave } from 'react-icons/fi'; import { Card } from '@app/components/generic/Card'; import { Input } from '@app/components/generic/Input'; import { Tabs } from '@app/components/generic/Tabs'; import { Toggle } from '@app/components/generic/Toggle'; import { bleConnection, serialConnection } from '@app/core/connection'; import { useAppSelector } from '@app/hooks/redux'; import { Button } from '@components/generic/Button'; import { PrimaryTemplate } from '@components/templates/PrimaryTemplate'; import type { Protobuf } from '@meshtastic/meshtasticjs'; export interface ConnectionProps { navOpen: boolean; setNavOpen: React.Dispatch>; } export const Connection = ({ navOpen, setNavOpen, }: ConnectionProps): JSX.Element => { const { t } = useTranslation(); const user = useAppSelector((state) => state.meshtastic.user); const { register, handleSubmit, formState } = useForm({ defaultValues: user, }); const onSubmit = handleSubmit((data) => { // void connection.setOwner(data); }); return ( } onClick={(): void => { setNavOpen(!navOpen); }} circle /> } footer={ } >
Current connection method:
BLE
), }, { name: 'Bluetooth', body: (
Devices:
Device Name
Device Name
), }, { name: 'Serial', body: (
Devices:
Device Name
Device Name
), }, ]} />
); };