-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICO-245 Fix homepage loading #118
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,13 @@ | |||
export const useSeoUrlStore = defineStore('seoUrl', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think a Store is necessary in this case since the data is not supposed to be shared throughout multiple pages or in other words it is reset/reassigned for each page. Usage of inject/provide would be more fitting for the circumstances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it should be shared with the root of pages and the languageSwitch component which is situated in the layout. Using the context('navigation') doesn't work because ...all and the languageSwitch are siblings
If the admin of the shopware configures categories with different seo-urls per language, we need to do a request do get the new seoPathInfo for the active navigation so that we can replace the url to the one which is language specific. In this way if the user refreshes the page it will get the page instead of having a 404 because it tried getting a SEO-URL for a different language.