Skip to content

Commit 8e18e2a

Browse files
committed
added breadcrumbs
1 parent 4a4c460 commit 8e18e2a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

frontend/javascripts/admin/auth/account_settings_view.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { SafetyOutlined, SettingOutlined, UserOutlined } from "@ant-design/icons";
2-
import { Layout, Menu } from "antd";
2+
import { Breadcrumb, Layout, Menu } from "antd";
33
import type { MenuItemGroupType } from "antd/es/menu/interface";
44
import { Route, Switch, useHistory, useLocation } from "react-router-dom";
55
import AuthTokenView from "./auth_token_view";
@@ -43,9 +43,10 @@ function AccountSettingsView() {
4343
},
4444
];
4545

46+
const subPageBreadcrumb = selectedKey.charAt(0).toUpperCase() + selectedKey.slice(1);
47+
4648
return (
4749
<Layout style={{ minHeight: "calc(100vh - 64px)" }} className="container">
48-
<h1>Account Settings</h1>
4950
<Layout>
5051
<Sider width={200}>
5152
<Menu
@@ -56,7 +57,11 @@ function AccountSettingsView() {
5657
onClick={({ key }) => history.push(`/account/${key}`)}
5758
/>
5859
</Sider>
59-
<Content style={{ padding: "24px", paddingTop: 0, minHeight: 280 }}>
60+
<Content style={{ padding: "24px", paddingTop: 0, minHeight: 280, maxWidth: 1000 }}>
61+
<Breadcrumb style={{ marginBottom: "16px", padding: "8px 0" }}>
62+
<Breadcrumb.Item>Account Settings</Breadcrumb.Item>
63+
<Breadcrumb.Item>{subPageBreadcrumb}</Breadcrumb.Item>
64+
</Breadcrumb>
6065
<Switch>
6166
<Route path="/account/profile" component={ProfileView} />
6267
<Route path="/account/password" component={ChangePasswordView} />

0 commit comments

Comments
 (0)