fix style

This commit is contained in:
srgooglo 2022-09-08 20:35:24 +02:00
parent 6234cae12c
commit 54867d7eb1
4 changed files with 16 additions and 7 deletions

View File

@ -90,6 +90,8 @@ export default class Account extends React.Component {
isNotExistent: false,
}
contentRef = React.createRef()
coverComponent = React.createRef()
api = window.app.api.withEndpoints("main")
@ -201,8 +203,10 @@ export default class Account extends React.Component {
// if component scrolled foward set cover height to 0
if (e.target.scrollTop > 0) {
this.coverComponent.current.style.height = "0px"
this.contentRef.current.style.height = "100vh"
} else {
this.coverComponent.current.style.height = ""
this.contentRef.current.style.height = ""
}
}
@ -271,7 +275,7 @@ export default class Account extends React.Component {
</div>
</div>
<div className="contents" onScroll={this.handleScroll}>
<div ref={this.contentRef} className="contents" onScroll={this.handleScroll}>
<div className="tabMenuWrapper">
<antd.Menu
className="tabMenu"

View File

@ -178,13 +178,15 @@
grid-row-gap: 0px;
width: 100%;
height: 100vh;
height: 65vh;
overflow: hidden;
overflow-y: overlay;
margin-top: -1.5vh;
transition: all 0.3s ease-in-out;
.tabContent {
position: sticky;
border-radius: @borderRadius;

View File

@ -103,10 +103,8 @@ export default class Dashboard extends React.Component {
</div>
<div className="card" id="trendings">
<div>
<h2><Icons.TrendingUp /> Trendings</h2>
<HashtagTrendings />
</div>
<h2><Icons.TrendingUp /> Trendings</h2>
<HashtagTrendings />
</div>
</div>
</div>

View File

@ -8,6 +8,11 @@
width: 100%;
.panel {
position: sticky;
top: 0;
height: fit-content;
display: flex;
flex-direction: column;