Skip to content

Commit

Permalink
Preserve current language when navigating
Browse files Browse the repository at this point in the history
Ensure that setting the current state of the application in the
navigation bar preserves the current language setting. #233
  • Loading branch information
ijdickinson committed Aug 7, 2020
1 parent b05f6b9 commit 32ce7ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/javascript/store/navigation-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ function currentNavigationState (state) {
})

const queryStr = QueryString.stringify(urlState, { arrayFormat: 'bracket' })
const queryLangStr = `${queryStr}&lang=${window.ukhpi.locale}`

return {
navState,
url: `${window.location.pathname}?${queryStr}`
url: `${window.location.pathname}?${queryLangStr}`
}
}

Expand Down

0 comments on commit 32ce7ca

Please sign in to comment.