mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 14:44:15 +00:00
fix: wrap username change in try/catch and remove GET function
This commit is contained in:
parent
d2522c8d93
commit
50b402e5d9
2 changed files with 10 additions and 12 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue