I am creating a clone project in which I am getting a "Declaration or statement expected" in a switch statement. I am not able to find any error in the syntax of my code. Also couldn't find any answers on the net.
swtich(action.type) {
case actionTypes.SET_USER:
return ({
...state,
user:action.user
});
default:
(return state);
}
Github Link of my project: https://github.com/aditramdas/Chat-App/tree/main/chat-app-new