"use client"; import { useState, useEffect } from "react"; import ReactModal from "react-modal"; import KueEinstellung from "./KueEinstellung"; import TdrEinstellung from "./TdrEinstellung"; import Knotenpunkte from "./Knotenpunkte"; interface KueModalProps { showModal: boolean; onClose: () => void; slot: number; onModulNameChange: (id: string) => void; // NEU! } export default function KueModal({ showModal, onClose, slot }: KueModalProps) { const [activeTab, setActiveTab] = useState<"kue" | "tdr" | "knoten">("kue"); useEffect(() => { if (showModal) { setActiveTab("kue"); } }, [showModal]); return (

Einstellungen – Slot {slot + 1}

{activeTab === "kue" && ( { console.log("Modulname geändert:", id); }} onClose={onClose} /> )} {activeTab === "tdr" && } {activeTab === "knoten" && }
); }