cds-snc / node-starter-app

Quick start application setup.... because you have to start somewhere.
MIT License
5 stars 3 forks source link

Language setting is lost after 2 navigation clicks #74

Closed smcmurtry closed 4 years ago

smcmurtry commented 4 years ago

If I select french on the landing page, then click to the next page, it is in french but the lang query param has been lost. So then when I click to the next next page it is in english.

One way to fix this would be to add a utility function that adds the query params from the current page to the next route. This would have to be set both for the nextRoute variable that is passed to the template, and the redirect that the middleware does when a post request is submitted from a form page.

smcmurtry commented 4 years ago

Here's my attempt to fix this: https://github.com/cds-snc/simplify-privacy-statements-V2/pull/34

Could probably be generalized better.

dsamojlenko commented 4 years ago

Fixed in #78