Skip to content

Commit 4a4c460

Browse files
committed
fix typeing
1 parent 33b0b1a commit 4a4c460

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

frontend/javascripts/admin/auth/account_settings_view.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { SafetyOutlined, SettingOutlined, UserOutlined } from "@ant-design/icons";
22
import { Layout, Menu } from "antd";
3+
import type { MenuItemGroupType } from "antd/es/menu/interface";
34
import { Route, Switch, useHistory, useLocation } from "react-router-dom";
45
import AuthTokenView from "./auth_token_view";
56
import ChangePasswordView from "./change_password_view";
@@ -12,7 +13,7 @@ function AccountSettingsView() {
1213
const history = useHistory();
1314
const selectedKey = location.pathname.split("/").pop() || "profile";
1415

15-
const menuItems = [
16+
const menuItems: MenuItemGroupType[] = [
1617
{
1718
label: "Account",
1819
type: "group",

frontend/javascripts/admin/auth/auth_token_view.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,18 @@ function AuthTokenView() {
6060
</Button>
6161
),
6262
},
63-
activeUser
64-
? {
65-
label: "Organization ID",
66-
children: (
67-
<Text code copyable>
68-
{activeUser.organization}
69-
</Text>
70-
),
71-
}
72-
: null,
63+
...(activeUser
64+
? [
65+
{
66+
label: "Organization ID",
67+
children: (
68+
<Text code copyable>
69+
{activeUser.organization}
70+
</Text>
71+
),
72+
},
73+
]
74+
: []),
7375
{
7476
label: "API Documentation",
7577
children: <a href="https://docs.webknossos.org/webknossos-py/index.html">Read the docs</a>,

0 commit comments

Comments
 (0)