You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@zaaakher Thanks for pointing out this issue! I think the main issue is that the library breaks when NextJS attempt to do server-side rendering because the library depends on being able to read values from the stylesheet to size the component. I'll look into the issue this weekend!
@zaaakher Try upgrading to v0.1.11, you shouldn't the get error anymore but you also won't be able to directly set the height of your devices. To control the height of the device, see pixelsign/html5-device-mockups#47.
It seems this line is causing an error in Nextjs when I try to import the library
https://github.com/kajchang/react-device-mockups/blob/7b976cb1a3c8ff3a550f8fafffd52f54cb818811/src/Device.tsx#L51-L53
My
package.json
And at first I used it regularly in
/pages/index.js
of my projectAnd then based on this answer, I tried using this approach by importing the css in
pages/_apps.js
The text was updated successfully, but these errors were encountered: