mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Clean up MetaMetricsProvider constructor (#7719)
This commit is contained in:
parent
6c1bce28ac
commit
1820836833
@ -42,19 +42,19 @@ class MetaMetricsProvider extends Component {
|
|||||||
constructor (props) {
|
constructor (props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
this.state = {
|
|
||||||
previousPath: '',
|
|
||||||
currentPath: window.location.href,
|
|
||||||
}
|
|
||||||
|
|
||||||
props.history.listen(() => {
|
props.history.listen(() => {
|
||||||
this.setState({
|
this.setState((prevState) => ({
|
||||||
previousPath: this.state.currentPath,
|
previousPath: prevState.currentPath,
|
||||||
currentPath: window.location.href,
|
currentPath: window.location.href,
|
||||||
})
|
}))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
state = {
|
||||||
|
previousPath: '',
|
||||||
|
currentPath: window.location.href,
|
||||||
|
}
|
||||||
|
|
||||||
getChildContext () {
|
getChildContext () {
|
||||||
const {
|
const {
|
||||||
network,
|
network,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user