Open Awais512 opened 2 years ago
}, 12 | userInfo: Cookies.get('userInfo')
13 | ? JSON.parse(Cookies.get('userInfo')) | ^ 14 | : null,
Giving error in the store here. I don't know whats the problem is
Here is the screenshot above
just in Store.js add JSON.stringify
like::
userInfo: Cookies.get('userInfo') ? JSON.parse(JSON.stringify(Cookies.get('userInfo'))) : null,
Cookies.set('userInfo', JSON.stringify(data));
In your login.js fixes the issue. You have to convert the object to string so it can be stored properly
}, 12 | userInfo: Cookies.get('userInfo')
Giving error in the store here. I don't know whats the problem is
Here is the screenshot above