1
1
import { SafetyOutlined , SettingOutlined , UserOutlined } from "@ant-design/icons" ;
2
2
import { Breadcrumb , Layout , Menu } from "antd" ;
3
3
import type { MenuItemGroupType } from "antd/es/menu/interface" ;
4
- import { Route , Switch , useHistory , useLocation } from "react-router-dom" ;
4
+ import { Redirect , Route , Switch , useHistory , useLocation } from "react-router-dom" ;
5
5
import AccountAuthTokenView from "./account_auth_token_view" ;
6
6
import AccountPasswordView from "./account_password_view" ;
7
7
import AccountProfileView from "./account_profile_view" ;
@@ -50,17 +50,19 @@ function AccountSettingsView() {
50
50
] ;
51
51
52
52
return (
53
- < Layout style = { { minHeight : "calc(100vh - 64px)" } } className = "container" >
53
+ < Layout
54
+ style = { { minHeight : "calc(100vh - 64px)" , backgroundColor : "var(--ant-layout-body-bg)" } }
55
+ >
54
56
< Sider width = { 200 } >
55
57
< Menu
56
58
mode = "inline"
57
59
selectedKeys = { [ selectedKey ] }
58
- style = { { height : "100%" } }
60
+ style = { { height : "100%" , padding : 24 } }
59
61
items = { menuItems }
60
62
onClick = { ( { key } ) => history . push ( `/account/${ key } ` ) }
61
63
/>
62
64
</ Sider >
63
- < Content style = { { padding : "24px" , paddingTop : 0 , minHeight : 280 , maxWidth : 1000 } } >
65
+ < Content style = { { padding : "24px" , minHeight : 280 , maxWidth : 1000 } } >
64
66
< Breadcrumb style = { { marginBottom : "16px" , padding : "8px 0" } } >
65
67
< Breadcrumb . Item > Account Settings</ Breadcrumb . Item >
66
68
< Breadcrumb . Item >
@@ -71,7 +73,7 @@ function AccountSettingsView() {
71
73
< Route path = "/account/profile" component = { AccountProfileView } />
72
74
< Route path = "/account/password" component = { AccountPasswordView } />
73
75
< Route path = "/account/token" component = { AccountAuthTokenView } />
74
- < Route path = "/account" component = { AccountProfileView } />
76
+ < Route path = "/account" render = { ( ) => < Redirect to = "/account/profile" /> } />
75
77
</ Switch >
76
78
</ Content >
77
79
</ Layout >
0 commit comments