Skip to content

Commit 534fb11

Browse files
authored
remove duplicate componentDidMount (#531)
1 parent 758fff2 commit 534fb11

File tree

6 files changed

+3
-18
lines changed

6 files changed

+3
-18
lines changed

app/components/SendModal/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ class SendModal extends Component {
7575
hip2.setServers([`127.0.0.1:${props.hip2Port}`]);
7676
}
7777

78-
componentDidMount () {
79-
analytics.screenView('Send');
80-
}
81-
8278
openLinkHandler (e) {
8379
e.preventDefault()
8480
shell.openExternal(e.target.href)
@@ -170,6 +166,7 @@ class SendModal extends Component {
170166

171167
componentDidMount = () => {
172168
document.addEventListener('keydown', this.handleEscape)
169+
analytics.screenView('Send');
173170
}
174171

175172
componentWillUnmount = () => {

app/components/Transactions/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ export default class Transactions extends Component {
5858
this.setState({
5959
itemsPerPage: itemsPerPage || 5,
6060
});
61-
}
6261

63-
async componentDidMount() {
6462
await this.props.fetchTransactions();
6563
}
6664

app/pages/Auction/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ export default class Auction extends Component {
101101
} finally {
102102
this.setState({isLoading: false});
103103
}
104-
}
105-
106-
componentDidMount() {
107104
analytics.screenView('Auction');
108105
}
109106

app/pages/DomainManager/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,15 @@ class DomainManager extends Component {
6666
|| this.state.itemsPerPage !== nextState.itemsPerPage;
6767
}
6868

69-
componentDidMount() {
70-
analytics.screenView('Domain Manager');
71-
}
72-
7369
async componentDidMount() {
7470
this.props.getMyNames();
7571
const itemsPerPage = await dbClient.get(DM_ITEMS_PER_PAGE_KEY);
7672

7773
this.setState({
7874
itemsPerPage: itemsPerPage || 10,
7975
});
76+
77+
analytics.screenView('Domain Manager');
8078
}
8179

8280
onChange = (name) => (e) => {

app/pages/MyDomain/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ class MyDomain extends Component {
3838
async componentDidMount() {
3939
await this.props.getNameInfo();
4040
await this.props.fetchPendingTransactions();
41-
}
42-
43-
componentDidMount() {
4441
analytics.screenView('My Domains');
4542
}
4643

app/pages/Watching/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ class Watching extends Component {
6060
this.setState({
6161
itemsPerPage: itemsPerPage || 10,
6262
});
63-
}
6463

65-
componentDidMount() {
6664
analytics.screenView('Watching');
6765
}
6866

0 commit comments

Comments
 (0)