Closed diversemix closed 1 year ago
This is a record of a discussion around this PR: [https://github.com/climatepolicyradar/navigator/pull/898](https://github.com/climatepolicyradar/navigator/pull/898) **Note -** There is still some concern that although this does get the env vars into the client at runtime, the app might still struggle. @patrick has seen issues when the THEME is flipped at runtime even on SSR pages as it appears the app does default to using `cpr` on the client side before the env queried and used. The PR below was merged as it does improve things code wise. But we still do not have 100% confidence that this will work The fall back is to carry on building 2 images and pushing to separate ECR repos. While this might impact CI times it will be simple enough to do for now and will guarantee the behaviour we want. This ticket is being left open until it is fully resolved by either: * The app fully working and configurable at runtime * The acceptance of building and deploying multiple images **DO NOT CLOSE WITHOUT ACCEPTING ONE OF THE ABOVE**
It was noted that in order to get a stable version of middleware and to be able to use the config from a function, we needed to update Nextjs. Was decided to go with the latest version, this also enforced React v18 ... so that was done as well.
react-i18next
codemod
as suggested by Nextjschildren