feat: show error msg
This commit is contained in:
@@ -43,7 +43,7 @@ const Register = () => {
|
|||||||
window.localStorage.setItem('user', JSON.stringify(data));
|
window.localStorage.setItem('user', JSON.stringify(data));
|
||||||
navigate('/');
|
navigate('/');
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
notify('error', err.response.data.message);
|
notify('error', err.response.data || 'Registration Failed. Please try again.');
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user