import React from 'react'; import { FiLayers, FiLayout, FiMapPin, FiRadio, FiUser, FiWifi, FiZap, } from 'react-icons/fi'; import type { SidebarItemProps } from '@app/components/generic/SidebarItem.js'; import { PageLayout } from '@components/templates/PageLayout'; import { Channels } from './Channels'; import { Interface } from './Interface'; import { Position } from './Position'; import { Power } from './Power'; import { Radio } from './Radio'; import { User } from './User'; import { WiFi } from './WiFi'; export const Settings = (): JSX.Element => { // const { hasGps, hasWifi } = useAppSelector((state) => state.meshtastic.radio.hardware); const hasGps = true; const hasWifi = true; const panels: JSX.Element[] = [ , , , , , ]; const sidebarItems: SidebarItemProps[] = [ { title: 'User', description: 'Device name and details', icon: , }, { title: 'Power', description: 'Power and sleep settings', icon: , }, { title: 'Radio', description: 'LoRa settings', icon: , }, { title: 'Channels', description: 'Manage channels', icon: , }, { title: 'Interface', description: 'Language and UI settings', icon: , }, ]; React.useEffect(() => { if (hasGps) { panels.unshift(); sidebarItems.unshift({ title: 'Position', description: 'Position settings and flags', icon: , }); } if (hasWifi) { panels.unshift(); sidebarItems.unshift({ title: 'WiFi', description: 'WiFi credentials and mode', icon: , }); } console.log(panels); }, [hasGps, hasWifi]); return ( ); };