mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-05 22:38:48 +00:00
Logout button
This commit is contained in:
parent
9f742dba64
commit
c0f7ec97f3
2 changed files with 14 additions and 2 deletions
|
|
@ -29,6 +29,11 @@ class HomePage extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
logout() {
|
||||
authenticationService.logout();
|
||||
history.push('/login');
|
||||
}
|
||||
|
||||
render() {
|
||||
const { currentUser, users, apps, isLoading } = this.state;
|
||||
return (
|
||||
|
|
@ -73,7 +78,8 @@ class HomePage extends React.Component {
|
|||
<div className="nav-item dropdown">
|
||||
<a href="#" className="nav-link d-flex lh-1 text-reset p-0" data-bs-toggle="dropdown" aria-label="Open user menu">
|
||||
<div className="d-none d-xl-block ps-2">
|
||||
<div>{this.state.currentUser.first_name}</div>
|
||||
{/* <div>{this.state.currentUser.first_name}</div> */}
|
||||
<span onClick={this.logout}>Logout</span>
|
||||
</div>
|
||||
</a>
|
||||
<div className="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
|
||||
|
|
|
|||
|
|
@ -70,6 +70,11 @@ class ManageOrgUsers extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
logout() {
|
||||
authenticationService.logout();
|
||||
history.push('/login');
|
||||
}
|
||||
|
||||
render() {
|
||||
const { isLoading, showNewUserForm, creatingUser, users, newUser, idChangingRole } = this.state;
|
||||
|
||||
|
|
@ -114,7 +119,8 @@ class ManageOrgUsers extends React.Component {
|
|||
<div className="nav-item dropdown">
|
||||
<a href="#" className="nav-link d-flex lh-1 text-reset p-0" data-bs-toggle="dropdown" aria-label="Open user menu">
|
||||
<div className="d-none d-xl-block ps-2">
|
||||
<div>{this.state.currentUser.first_name}</div>
|
||||
{/* <div>{this.state.currentUser.first_name}</div> */}
|
||||
<span onClick={this.logout}>Logout</span>
|
||||
</div>
|
||||
</a>
|
||||
<div className="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
|
||||
|
|
|
|||
Loading…
Reference in a new issue