Skip to content

Commit 66f801b

Browse files
hdJerryMegio
andauthored
chore: fix scroll (#1927)
* chore: fix scroll * fix: errors in profile styles file --------- Co-authored-by: Mattia Magi <mattia.magi91@gmail.com>
1 parent 2dc6472 commit 66f801b

2 files changed

Lines changed: 21 additions & 17 deletions

File tree

cra-rxjs-styled-components/src/components/layouts/ProfileLayout.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
import styled from 'styled-components';
22

33
export const Layout = styled.div`
4-
height: calc(100% - 70px);
4+
height: calc(100% - 70px);
55
padding: 0 1rem;
6-
background-color: rgb(255, 255, 255);
7-
display: grid;
6+
background-color: rgb(255, 255, 255);
7+
display: grid;
88
overflow: hidden;
99
10-
grid-template-columns: auto;
11-
grid-template-areas:
12-
'header'
13-
'aside'
14-
'content'
15-
'footer';
16-
}
10+
grid-template-columns: auto;
11+
grid-template-areas:
12+
'header'
13+
'aside'
14+
'content'
15+
'footer';
1716
18-
@media (min-width: 850px) {
19-
grid-template-columns: 384px auto;
20-
grid-template-areas: 'aside content' 'footer footer';
21-
margin: 20px;
22-
height: calc(100% - 110px);
17+
@media (min-width: 850px) {
18+
grid-template-columns: 384px auto;
19+
grid-template-areas: 'aside content' 'footer footer';
20+
margin: 20px;
21+
height: calc(100% - 110px);
22+
}
2323
`;
2424

2525
export const NetlifyBadgeContainer = styled.div`

cra-rxjs-styled-components/src/routes/profile.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ function Profile() {
3232
grid-area: content;
3333
`;
3434

35+
const Main = styled.div`
36+
min-height: calc(100vh - 172px);
37+
`;
38+
3539
const sortAndFilteredRepositories = useRepoSortFilter(repositories);
3640

3741
return (
38-
<>
42+
<Main>
3943
<Header />
4044
<Layout>
4145
<UserProfileView />
@@ -78,7 +82,7 @@ function Profile() {
7882
</a>
7983
</NetlifyBadgeContainer>
8084
</Layout>
81-
</>
85+
</Main>
8286
);
8387
}
8488

0 commit comments

Comments
 (0)