"use client"; //components/main/uebersicht/NetworkInfo.tsx import React from "react"; import { useSelector } from "react-redux"; import { RootState } from "../../../redux/store"; const NetworkInfo: React.FC = () => { // Werte direkt aus Redux holen const ip = useSelector((state: RootState) => state.systemSettings.ip) || "Unbekannt"; const subnet = useSelector((state: RootState) => state.systemSettings.subnet) || "Unbekannt"; const gateway = useSelector((state: RootState) => state.systemSettings.gateway) || "Unbekannt"; const opcUaZustandRaw = useSelector( (state: RootState) => state.opcuaSettings.opcUaZustand ); const opcUaNodesetName = useSelector((state: RootState) => state.opcuaSettings.opcUaNodesetName) || "Unbekannt"; // OPC-UA Zustand in lesbaren Text umwandeln const opcUaZustand = Number(opcUaZustandRaw) === 1 ? "Server betriebsbereit" : Number(opcUaZustandRaw) === 0 ? "Server außer Betrieb" : "Unbekannt"; return (
IP-Adresse
{ip}
Subnet-Maske
{subnet}
Gateway
{gateway}
Status
{opcUaZustand}
Nodeset Name
{opcUaNodesetName}