import React from "react"; import { Button, Card, Field, Input, Stack, Alert } from "@chakra-ui/react"; import { changePW } from "@/utils/userActions"; import { useState } from "react"; type ChangePWformProps = { onClose: () => void; alert: ( status: "success" | "error", message: string, description: string ) => void; username: string; }; const ChangePWform: React.FC = ({ onClose, alert, username, }) => { const [showSubAlert, setShowSubAlert] = useState(false); const [subAlertMessage, setSubAlertMessage] = useState(""); const subAlert = (message: string) => { setSubAlertMessage(message); setShowSubAlert(true); }; return (
Passwort ändern Füllen Sie das folgende Formular aus, um das Passwort zu ändern. Neues Passwort Neues Passwort widerholen {showSubAlert && ( {subAlertMessage} )}
); }; export default ChangePWform;