sek-consulting / solid-ui

Beautifully designed components. Built with Kobalte & corvu. Styled with Tailwind CSS.
https://www.solid-ui.com
MIT License
674 stars 25 forks source link

fix: hydration issue in drawer-dialog example #96

Closed GiyoMoon closed 1 month ago

GiyoMoon commented 1 month ago

This PR fixes the "Responsive Dialog" example. The code caused hydration mismatches because we ran stuff dependent on isServer inside the component function. This moves the innerWidth check in an effect which fixes it. The example isn't responsive, meaning if the user resizes the browser it doesn't change what component to render. I can change this if you prefer it to be responsive, but I think for this example it's fine.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: e0f794b31a7e7b647c894ce58d998a9e1bcc614e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---- | ----- | | docs | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
solid-ui-components ❌ Failed (Inspect) May 26, 2024 8:15pm