TP-24538: Login bug fix

This commit is contained in:
k.kamalakannan
2023-05-09 20:01:32 +05:30
parent 3709effc9a
commit 56eec996eb
2 changed files with 3 additions and 1 deletions

View File

@@ -44,6 +44,8 @@ const App = () => {
'You are not authorized to perform this action. Permission denied!',
);
}
localStorage.setItem('react-token', 'null');
localStorage.setItem('user-data', 'null');
});
}
}, []);

View File

@@ -65,7 +65,7 @@ const LeftNav: React.FC<LeftNavProps> = ({ children }) => {
];
const returnUserData = () => {
if (userDetails?.length) {
if (userDetails && userDetails?.length) {
try {
const parsedUserData = JSON.parse(userDetails);
return parsedUserData?.preferred_username || 'User';