diff --git a/src/pages/Account/Settings/Info.js b/src/pages/Account/Settings/Info.js
index 0b0adb41af0a654424c76b7c3ffd2e8aa6bda9e1..de7b86e42cc05072f93aa1c5990bc9405cefb12f 100644
--- a/src/pages/Account/Settings/Info.js
+++ b/src/pages/Account/Settings/Info.js
@@ -15,30 +15,27 @@ export default class Info extends Component {
constructor(props) {
super(props);
const { match, location } = props;
+ const menuMap = {
+ base: ,
+ security: (
+
+ ),
+ binding: (
+
+ ),
+ notification: (
+
+ ),
+ };
+ const key = location.pathname.replace(`${match.path}/`, '');
this.state = {
mode: 'inline',
- menuMap: {
- base: ,
- security: (
-
- ),
- binding: (
-
- ),
- notification: (
-
- ),
- },
+ menuMap,
+ selectKey: menuMap[key] ? key : 'base',
};
- let key = location.pathname.replace(`${match.path}/`, '');
- const { menuMap } = this.state;
- key = menuMap[key] ? key : 'base';
- this.setState({
- selectKey: key,
- });
}
static getDerivedStateFromProps(props, state) {