fix: wrap username change in try/catch and remove GET function

This commit is contained in:
trafficlunar 2025-04-10 22:52:37 +01:00
parent d2522c8d93
commit 50b402e5d9
2 changed files with 10 additions and 12 deletions

View file

@ -5,7 +5,7 @@ import { redirect } from "next/navigation";
export default function UsernameForm() {
const [username, setUsername] = useState("");
const [error, setError] = useState(null);
const [error, setError] = useState<string | undefined>(undefined);
const handleSubmit = async (event: FormEvent) => {
event.preventDefault();