import { useState } from "react"; import { useParams } from "react-router-dom"; import Button from "./Button"; export default function ChangeRoles(): JSX.Element { const [selectedRole, setSelectedRole] = useState(""); const { username } = useParams(); const handleRoleChange = ( event: React.ChangeEvent, ): void => { setSelectedRole(event.target.value); }; // const handleSubmit = async (event: React.FormEvent) => { // event.preventDefault(); // const response = await api.changeRole(username, selectedRole, token); // if (response.success) { // console.log("Role changed successfully"); // } else { // console.error("Failed to change role:", response.message); // } // }; return ( <>

Change roll for: {username}