42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
import React, { useState } from "react";
|
|
import GeneralSettings from "../components/settingsPageComponents/generalSettings";
|
|
import OPCUAInterfaceSettings from "../components/settingsPageComponents/OPCUAInterfaceSettings";
|
|
|
|
export default function Settings() {
|
|
const [activeTab, setActiveTab] = useState("tab1");
|
|
|
|
return (
|
|
<div className="p-4">
|
|
{/* Tab-Navigation */}
|
|
<div className="flex border-b border-gray-200">
|
|
<button
|
|
className={`px-4 py-2 ${
|
|
activeTab === "tab1"
|
|
? "border-b-2 border-blue-500 text-blue-500"
|
|
: ""
|
|
}`}
|
|
onClick={() => setActiveTab("tab1")}
|
|
>
|
|
Allgemeine Einstellung
|
|
</button>
|
|
<button
|
|
className={`px-4 py-2 ${
|
|
activeTab === "tab2"
|
|
? "border-b-2 border-blue-500 text-blue-500"
|
|
: ""
|
|
}`}
|
|
onClick={() => setActiveTab("tab2")}
|
|
>
|
|
OPCUA
|
|
</button>
|
|
</div>
|
|
|
|
{/* Tab-Inhalt */}
|
|
<div className="mt-4">
|
|
{activeTab === "tab1" && <GeneralSettings />}
|
|
{activeTab === "tab2" && <OPCUAInterfaceSettings />}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|