fix build

This commit is contained in:
Sacha Weatherstone
2022-08-09 09:13:27 +10:00
parent ed9ee28745
commit 1f2637eb12
10 changed files with 189 additions and 82 deletions
+2 -6
View File
@@ -5,7 +5,7 @@ import { Button, LayerIcon, LayerOutlineIcon, Tooltip } from "evergreen-ui";
import { IoQrCodeOutline } from "react-icons/io5";
import { QRDialog } from "@app/components/Dialog/QRDialog.js";
import { Tab, TabbedContent } from "@components/layout/page/TabbedContent";
import { TabbedContent, TabType } from "@components/layout/page/TabbedContent";
import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs";
@@ -14,11 +14,9 @@ import { Channel } from "./Channel.js";
export const ChannelsPage = (): JSX.Element => {
const { channels, config } = useDevice();
const [QRDialogOpen, setQRDialogOpen] = useState(false);
const [activeChannel, setActiveChannel] = useState(0);
const tabs: Tab[] = channels.map((channel) => {
const tabs: TabType[] = channels.map((channel) => {
return {
key: channel.config.index,
name: channel.config.settings?.name.length
? channel.config.settings.name
: channel.config.role === Protobuf.Channel_Role.PRIMARY
@@ -43,8 +41,6 @@ export const ChannelsPage = (): JSX.Element => {
loraConfig={config.lora}
/>
<TabbedContent
active={activeChannel}
setActive={setActiveChannel}
tabs={tabs}
actions={[
() => (