pgaes Verzeichnis Struktur verbessert
This commit is contained in:
41
pages/einstellungen.tsx
Normal file
41
pages/einstellungen.tsx
Normal file
@@ -0,0 +1,41 @@
|
||||
import React, { useState } from "react";
|
||||
import GeneralSettings from "../components/main/settingsPageComponents/generalSettings";
|
||||
import OPCUAInterfaceSettings from "../components/main/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 Einstellungen
|
||||
</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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user