We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4810337 commit 362c764Copy full SHA for 362c764
src/components/write/WriteMarkdownEditor.tsx
@@ -199,14 +199,16 @@ function WriterHead({
199
hide: boolean;
200
children: React.ReactNode;
201
}) {
202
+ const screenHeight =
203
+ (typeof window !== 'undefined' && window.screen.height) || 0;
204
+
205
const springStyle = useSpring({
- maxHeight: hide ? 0 : window.screen.height * 0.5,
206
+ maxHeight: hide ? 0 : screenHeight * 0.5,
207
opacity: hide ? 0 : 1,
208
config: {
209
duration: 300,
210
},
211
});
-
212
return (
213
<animated.div style={springStyle}>
214
<PaddingWrapper>{children}</PaddingWrapper>
0 commit comments