Omit NEXT_REDIRECT error output
This commit is contained in:
parent
9d564181dc
commit
dd88e75413
@ -282,7 +282,11 @@ export default function PhotoForm({
|
||||
? createPhotoAction
|
||||
: updatePhotoAction
|
||||
)(data)
|
||||
.catch(e => setFormActionErrorMessage(e.message))}
|
||||
.catch(e => {
|
||||
if (e.message !== 'NEXT_REDIRECT') {
|
||||
setFormActionErrorMessage(e.message);
|
||||
}
|
||||
})}
|
||||
onSubmit={() => {
|
||||
setFormActionErrorMessage('');
|
||||
(document.activeElement as HTMLElement)?.blur?.();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user