chore(docs): Fix use of navigate (#14706)
chore(docs): Fix use of navigate (#14706)

* Fixed gatsby build fail 

The navigate fn will not work on build since it needs access to the window which is only available in componentDidMount.

* chore: format

gatsbyjs/gatsby,gatsbyjs/gatsby,gatsbyjs/gatsby,ChristopherBiscardi/gatsby,ChristopherBiscardi/gatsby,ChristopherBiscardi/gatsby,ChristopherBiscardi/gatsby,gatsbyjs/gatsby,gatsbyjs/gatsby,gatsbyjs/gatsby