Skip to content

Commit

Permalink
[docs] Update page shell (#7760)
Browse files Browse the repository at this point in the history
  • Loading branch information
katydecorah authored Jan 10, 2019
1 parent b22d24f commit 865564f
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions vendor/docs-page-shell/react-page-shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ var nonMobile = {
to: '/vector-tiles/'
}, {
name: 'Maps APIs',
to: '/api-documentation/#maps'
to: '/api-documentation/maps/'
}]
},
navigation: {
Expand All @@ -299,13 +299,13 @@ var nonMobile = {
},
links: [{
name: 'Directions APIs',
to: '/api-documentation/#directions'
to: '/api-documentation/navigation/'
}]
},
search: {
links: [{
name: 'Geocoding API',
to: '/api-documentation/#geocoding'
to: '/api-documentation/search/'
}]
},
help: {
Expand Down Expand Up @@ -973,7 +973,6 @@ MetaTagger.defaultProps = {
largeImage: true
};

var pageShellInitialized = false;
var lastUrl;

var ReactPageShell =
Expand All @@ -991,12 +990,7 @@ function (_React$Component) {
key: "componentDidMount",
value: function componentDidMount() {
if (!window.MapboxPageShell) throw new Error('MapboxPageShell not loaded');

if (!pageShellInitialized) {
this.initialize();
} else {
MapboxPageShell.initialize();
}
this.initialize();
}
}, {
key: "componentDidUpdate",
Expand Down Expand Up @@ -1025,7 +1019,6 @@ function (_React$Component) {
MapboxPageShell.loadUserMenu({
dark: _this.props.darkHeaderText
});
pageShellInitialized = true;
});
}
}, {
Expand Down

0 comments on commit 865564f

Please sign in to comment.