import type React from "react"; import { useState } from "react"; import { Pane, Tab, Tablist } from "evergreen-ui"; import { ExternalNotification } from "@app/components/PageComponents/ModuleConfig/ExternalNotification.js"; import { MQTT } from "@components/PageComponents/ModuleConfig/MQTT.js"; import { Serial } from "@components/PageComponents/ModuleConfig/Serial.js"; export const AppConfig = (): JSX.Element => { const [selectedIndex, setSelectedIndex] = useState(0); const configSections = [ { label: "Interface", element: MQTT, }, { label: "Logging", element: Serial, }, { label: "Language", element: ExternalNotification, }, ]; return ( {configSections.map((Config, index) => ( setSelectedIndex(index)} > {Config.label} ))} {configSections.map((Config, index) => ( ))} ); };