improve header display behavior

This commit is contained in:
SrGooglo 2023-10-10 13:36:21 +00:00
parent 19fa3dc683
commit f1a7849cc7
2 changed files with 10 additions and 0 deletions

View File

@ -22,6 +22,14 @@ export default (props) => {
}, },
}) })
React.useEffect(() => {
if (render) {
app.layout.toggleDisableTopLayoutPadding(true)
} else {
app.layout.toggleDisableTopLayoutPadding(false)
}
}, [render])
return <Motion return <Motion
style={{ style={{
y: spring(render ? 0 : 100,), y: spring(render ? 0 : 100,),

View File

@ -31,6 +31,8 @@
} }
&.hidden { &.hidden {
display: none;
opacity: 0; opacity: 0;
height: 0; height: 0;
padding: 0; padding: 0;