Skip to content
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

Hydration errors 2 #191

Merged
merged 1 commit into from
Oct 19, 2024
Merged

Hydration errors 2 #191

merged 1 commit into from
Oct 19, 2024

Conversation

deetz99
Copy link
Collaborator

@deetz99 deetz99 commented Oct 19, 2024

fixed order of bg images on ppr marketing page causing hydration errors

@deetz99 deetz99 requested a review from thorwolpert October 19, 2024 20:44
@deetz99 deetz99 self-assigned this Oct 19, 2024
@@ -73,6 +75,13 @@ const { data: pprSections } = await useAsyncData(`ppr-sections-${locale.value}`,
return queryContent().where({ _locale: locale.value, _path: { $contains: 'ppr/sections' } }).find()
})

// srr safe media query
watchDebounced(width, () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting, for hydration issues?

Copy link
Collaborator Author

@deetz99 deetz99 Oct 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, initial render the ref is false on server and true on client so it causes a mismatch. This way the value is the same for server/client and still updates when the screen width changes, used debounced watcher to update once the screen width ref changes and to not fire multiple events if the screen changes width after mount.

@deetz99 deetz99 merged commit c44f878 into bcgov:feature-v2 Oct 19, 2024
8 of 10 checks passed
@deetz99 deetz99 deleted the hydration2 branch October 19, 2024 23:25
@seeker25
Copy link
Collaborator

seeker25 commented Oct 21, 2024

@deetz99 I've deployed main back to dev.. there are some 404 screens we keep seeing with login and logout

image
image

image

@seeker25
Copy link
Collaborator

Clicking here for example:

image

@deetz99
Copy link
Collaborator Author

deetz99 commented Oct 21, 2024

@seeker25

Okay thanks, I'll need to add in the login/logout redirects then. Do you know if the signin/bceid, signin/bcsc and signin/bceid are in use at all ?

@seeker25
Copy link
Collaborator

Yes they all are

@deetz99
Copy link
Collaborator Author

deetz99 commented Oct 21, 2024

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants