Fix Log out button not logging out

This commit is contained in:
Hornwitser committed 2022-06-23 16:57:52 +02:00
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" },
]}
/>;
+1 -1
View File
@@ -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() {