mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 07:04:53 +09:00
Fix Log out button not logging out
This commit is contained in:
1 parent
826d89c7dc
commit
51c025c79b
2 files changed
+4
-4
No files matched your search
@@ -30,14 +30,14 @@ export default function SiteLayout(props) {
|
||||
onClick={({ key }) => {
|
||||
if (key === "user") {
|
||||
history.push(`/users/${account.name}/view`);
|
||||
} else if (key === "logout") {
|
||||
account.logout();
|
||||
} else if (key === "logOut") {
|
||||
account.logOut();
|
||||
}
|
||||
}}
|
||||
items={[
|
||||
{ label: account.name, key: "user" },
|
||||
{ type: "divider" },
|
||||
{ label: "Log out", danger: true, key: "logout" },
|
||||
{ label: "Log out", danger: true, key: "logOut" },
|
||||
]}
|
||||
/>;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import ControlContext from "../components/ControlContext";
|
||||
* @property {?Array<object>} roles - Roles of the corrently logged in account.
|
||||
* @property {function(string)} hasPermission -
|
||||
* Check if the currently logged in account has the given permission.
|
||||
* @property {function()} logout - Logs out of the web interface.
|
||||
* @property {function()} logOut - Logs out of the web interface.
|
||||
*/
|
||||
|
||||
export function useAccount() {
|
||||
|
||||
Reference in new issue
Block a user