stackblitz / webcontainer-docs

WebContainer API Documentation
MIT License
67 stars 22 forks source link

fix: isDark not firing #55

Closed donmckenna closed 7 months ago

donmckenna commented 7 months ago

Fixes DES-118

The vitepress isDark helper from its useData() hook is used in the WCUsedBy component, aka "corporate logos" section. It fires correctly in development, but not on production, so isDark seemed to always default to false.

Fixed by wrapping isDark calls inside <ClientOnly> wrappers.

old new
Screen Shot 2024-01-20 at 10 04 06 PM Screen Shot 2024-01-20 at 10 04 36 PM
stackblitz[bot] commented 7 months ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

netlify[bot] commented 7 months ago

Deploy Preview for webcontainer-docs ready!

Name Link
Latest commit cdd1a2404b3926e1e36e5a89d67ebb084d361c89
Latest deploy log https://app.netlify.com/sites/webcontainer-docs/deploys/65aca7cff5f79e0008af57b5
Deploy Preview https://deploy-preview-55--webcontainer-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.