The action 'RESET' with payload {"index":1,"routes":[{"name":"DashboardScreen"}]} was not handled by any navigator.
API_POST('login', payload)
.then(async res => {
let data = res.data;
setIsSubmit(false);
console.log('data.success', data);
if (data.success == true) {
showToast(data.message);
navigation.dispatch(
CommonActions.reset({
index: 1,
routes: [
{name: 'DashboardScreen'},
],
}),
);