mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 00:13:13 +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 }) => {
|
onClick={({ key }) => {
|
||||||
if (key === "user") {
|
if (key === "user") {
|
||||||
history.push(`/users/${account.name}/view`);
|
history.push(`/users/${account.name}/view`);
|
||||||
} else if (key === "logout") {
|
} else if (key === "logOut") {
|
||||||
account.logout();
|
account.logOut();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
items={[
|
items={[
|
||||||
{ label: account.name, key: "user" },
|
{ label: account.name, key: "user" },
|
||||||
{ type: "divider" },
|
{ 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 {?Array<object>} roles - Roles of the corrently logged in account.
|
||||||
* @property {function(string)} hasPermission -
|
* @property {function(string)} hasPermission -
|
||||||
* Check if the currently logged in account has the given permission.
|
* 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() {
|
export function useAccount() {
|
||||||
|
|||||||
Reference in new issue
Block a user