<form
action={async (formData) => {
"use server";
try {
await login(formData);
} catch (err) {
console.error(err);
return;
}
redirect("/");
}}>
this is my code inside server component and i use redirect function outside of try/catch and without that and inside it but still not working!
inside try/catch return NEXT_REDIRECT error
I have tried various ways on the internet for this problem but none of them worked for me