Adds breadcrumbs to the Question and Visualization components.
There's some extra logic to allow us to easily hook them in to
the Saved Charts page when we've built it.
While it might have been possible to create dynamically generated
breadcrumbs, making it a bit more declaratory simplified the code
significantly. Similarly, it would probably be possible to locate this
at the top level instead of in the specific components where it appears,
but because we are only going to be using it on three screens, the
extra logic seemed like an over-complication.
To keep the breadcrumbs and the route paths coordinated, I moved the
route paths to a ROUTES object in the constants file.
Connects #10
Demo
Testing Instructions
Navigate to the homepage. You shouldn't see breadcrumbs.
Select a country/region and click next. You should see the Home link and the Questions link.
Select a question and click next. You should see the Home, Questions, and Charts links.
Click the the Charts link - nothing should happen.
Click the Questions link and you should navigate back to the Questions page.
Click the Home link and you should navigate back to the Home page.
Overview
Adds breadcrumbs to the Question and Visualization components. There's some extra logic to allow us to easily hook them in to the Saved Charts page when we've built it.
While it might have been possible to create dynamically generated breadcrumbs, making it a bit more declaratory simplified the code significantly. Similarly, it would probably be possible to locate this at the top level instead of in the specific components where it appears, but because we are only going to be using it on three screens, the extra logic seemed like an over-complication.
To keep the breadcrumbs and the route paths coordinated, I moved the route paths to a ROUTES object in the constants file.
Connects #10
Demo
Testing Instructions