Closed robbieaverill closed 3 years ago
@robbieaverill The is issue is as outlined below by Guy.
Pages that are statically optimized by Automatic Static Optimization will be hydrated without their route parameters provided, i.e query will be an empty object ({}). After hydration, Next.js will trigger an update to your application to provide the route parameters in the query object.
What we need to do to solve this is to encapsulate the login form and logic into a second component that is dynamic with no SSR. You can find information on how to do that here: https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr
yes this is right, think I did the same for the confirm page. see the Confirm component where had to declare no ssr when importing it in to the Confirm index page
Thanks @kvisca @jaepass and @notrab - PR to fix this at #154, and I've also raised a number of new enhancement issues to refactor and modernise the codebase a little.
yarn dev
)Expected: Customer should be logged in and be shown customer section Actual: login form shows again
https://nextjs.org/docs/routing/dynamic-routes#caveats