From 51c025c79b7a19c34aeaa6089d78445ffc29d889 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Thu, 23 Jun 2022 00:15:59 +0200 Subject: [PATCH] Fix Log out button not logging out --- packages/web_ui/src/components/SiteLayout.jsx | 6 +++--- packages/web_ui/src/model/account.jsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/web_ui/src/components/SiteLayout.jsx b/packages/web_ui/src/components/SiteLayout.jsx index f6c192fa..61606449 100644 --- a/packages/web_ui/src/components/SiteLayout.jsx +++ b/packages/web_ui/src/components/SiteLayout.jsx @@ -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" }, ]} />; diff --git a/packages/web_ui/src/model/account.jsx b/packages/web_ui/src/model/account.jsx index 165a50d1..c991aa6e 100644 --- a/packages/web_ui/src/model/account.jsx +++ b/packages/web_ui/src/model/account.jsx @@ -9,7 +9,7 @@ import ControlContext from "../components/ControlContext"; * @property {?Array} 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() {