import React from 'react'; import { Disclosure } from '@headlessui/react'; import { ChevronDownIcon, ChevronRightIcon, HashtagIcon, } from '@heroicons/react/outline'; import { Protobuf } from '@meshtastic/meshtasticjs'; import type { languageTemplate } from '../../../App'; import Channel from './Channel'; export interface ChannelsProps { isReady: boolean; channels: Protobuf.Channel[]; translations: languageTemplate; } const Channels = (props: ChannelsProps): JSX.Element => { return ( {({ open }) => ( <>
{open ? ( ) : ( )} {props.translations.device_channels_title}
<> {props.channels.map((channel, index) => { if (channel.role !== Protobuf.Channel_Role.DISABLED) return ; })} )}
); }; export default Channels;