mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
fix content height is missconfigurated when a profile has no cover
This commit is contained in:
parent
e82a2571b1
commit
c5d1211e6c
@ -206,6 +206,10 @@ export default class Account extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleScroll = (e) => {
|
handleScroll = (e) => {
|
||||||
|
if (!this.state.user?.cover) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
// if component scrolled foward set cover height to 0
|
// if component scrolled foward set cover height to 0
|
||||||
if (e.target.scrollTop > 0) {
|
if (e.target.scrollTop > 0) {
|
||||||
this.coverComponent.current.style.height = "0px"
|
this.coverComponent.current.style.height = "0px"
|
||||||
@ -288,7 +292,13 @@ export default class Account extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ref={this.contentRef} className="contents" onScroll={this.handleScroll}>
|
<div
|
||||||
|
ref={this.contentRef}
|
||||||
|
className="contents"
|
||||||
|
onScroll={this.handleScroll}
|
||||||
|
style={{ height: !this.state.user?.cover ? "100vh" : undefined }}
|
||||||
|
|
||||||
|
>
|
||||||
<div className="tabMenuWrapper">
|
<div className="tabMenuWrapper">
|
||||||
<antd.Menu
|
<antd.Menu
|
||||||
className="tabMenu"
|
className="tabMenu"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user