TP-24538: Login bug fix
This commit is contained in:
@@ -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');
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user