Closed maximilian-schwarz closed 3 months ago
hey, thanks for reporting it. It will be fixed together with https://github.com/shopware/frontends/pull/1192 I'm working rn. the problem was that cookie with a context token couldn't be read in the SSR. The PR will help to solve that.
@mkucmus Thank you :)
The current draft is here. :raised_hands:
Is there an existing issue for this?
Current Behavior
I remove the from the account menu because I want to render the menu on the server side. I have also activated "useUserContextInSSR". When I log out, isLoggedIn is wrong on the client and server side. When I log in with a customer account, isLoggedIn is true on the client side and false on the server side.
And because the values are different on client-side and server-side, you also get a hydration warning. And I know that you can easily fix it with the tag. But in this case, if you want to render it on the server side, that's not the point.
Expected Behavior
When I enabled the "useUserContextInSSR" option, I expected the UserContext to be available for client-side requests and server-side requests. Currently we got wrong responses with useUser() composable
Steps To Reproduce
Environment
No response
Anything else?
Reproduction link vue-demo-store: https://stackblitz.com/edit/github-5gcazj?file=components%2Faccount%2FAccountMenu.vue