masakudamatsu / line-height-picker

A front-end web app that helps web designers/developers pick the best line-height value for their websites
https://line-height-picker.vercel.app
MIT License
2 stars 1 forks source link

Turn the StepIndicator as links to each step #39

Closed masakudamatsu closed 4 years ago

masakudamatsu commented 4 years ago

TODO: Enable the link when the user has already visited the page.

When doing so, use the semantic HTML: use nav tag instead of div when stepIndicator styled component is defined in style.js

masakudamatsu commented 4 years ago

The link has been added.

But I cannot figure out how to enable the link if the user has already visited.

Using the useEffect hook can allow me to update the browsing history array. But the browsing history cannot be a state in this case.

masakudamatsu commented 4 years ago

The current implementation of how the link is disabled causes issue #107.

masakudamatsu commented 4 years ago

Using sessionStorage and React's useEffect hook (with [] as the second argument) allows me to enable the link if the user has visited the page.