Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 810b9e1

Browse files
author
madalynrose
committed
remove console.logs
1 parent 842830f commit 810b9e1

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

packages/gatsby/cache-dir/navigation.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,9 @@ const onPreRouteUpdate = (location, prevLocation) => {
4040
}
4141
}
4242

43-
const onRouteUpdate = (location, prevLocation, announceLocation) => {
43+
const onRouteUpdate = (location, prevLocation) => {
4444
if (!maybeRedirect(location.pathname)) {
4545
apiRunner(`onRouteUpdate`, { location, prevLocation })
46-
if (announceLocation) {
47-
announceLocation()
48-
}
4946
// Temp hack while awaiting https://github.com/reach/router/issues/119
5047
window.__navigatingToLink = false
5148
}
@@ -165,12 +162,10 @@ class RouteAnnouncer extends React.Component {
165162
constructor(props) {
166163
super(props)
167164
this.state = { announcement: `` }
168-
console.log(`constructor`)
169165
}
170166

171167
componentDidUpdate(prevProps) {
172168
requestAnimationFrame(() => {
173-
console.log(`updating`, this.props.location.pathname)
174169
let pageName = `new page at ${this.props.location.pathname}`
175170
if (document.title) {
176171
pageName = document.title
@@ -183,7 +178,6 @@ class RouteAnnouncer extends React.Component {
183178
}
184179
let newAnnouncement = `Navigated to ${pageName}`
185180
if (this.state.announcement !== newAnnouncement) {
186-
console.log(`setting state`, this.state.announcement, newAnnouncement)
187181
this.setState({
188182
announcement: newAnnouncement,
189183
})
@@ -192,7 +186,6 @@ class RouteAnnouncer extends React.Component {
192186
}
193187

194188
render() {
195-
console.log(`rendering`, this.props.location.pathname)
196189
const { announcement } = this.state
197190
return (
198191
<div

0 commit comments

Comments
 (0)