Skip to content

Commit

Permalink
rating history UI fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank-Gu-81 committed Jan 19, 2025
1 parent 7bb1a48 commit 1fd4cd5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 23 deletions.
5 changes: 5 additions & 0 deletions src/components/RatingHistory/RatingHistory.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
display: flex;
flex-direction: column;
align-items: center;
}

.rating-history-page {
padding: 3em;
height: 100vh;
}
48 changes: 25 additions & 23 deletions src/components/RatingHistory/RatingHistory.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,33 +46,35 @@ function RatingHistory({ userName, profilePic }) {
return (
<div>
<AppBar />
<Container maxWidth="xs" style={{ textAlign: 'center', paddingTop: '20px' }}>
<Box className="profile-box">
<Container className='rating-history-page'>

<Avatar sx={{ width: 80, height: 80 }} src={profilePic} />
<Typography variant="h5">{userName.displayName}</Typography>
</Box>
<br />
</Container>
<Container maxWidth="xs" style={{ textAlign: 'center', paddingTop: '20px' }}>
<Box className="profile-box">

<Avatar sx={{ width: 80, height: 80 }} src={profilePic} />
<Typography variant="h5">{userName.displayName}</Typography>
</Box>
<br />
</Container>

<Container maxWidth="sm">
<Box paddingBottom="30px">
<Stack spacing={3}>
{ filteredPost.length === 0 ?
(<p>Loading posts...</p>) :
(filteredPost
.slice()
.sort((a, b) => b.date.seconds - a.date.seconds).map((post) =>
<div key={post.id}>
<Post post={post} friends={fake_friends} />
</div>)
)
}
</Stack>
</Box>
<Container maxWidth="sm">
<Box paddingBottom="30px">
<Stack spacing={3}>
{ filteredPost.length === 0 ?
(<p>Loading posts...</p>) :
(filteredPost
.slice()
.sort((a, b) => b.date.seconds - a.date.seconds).map((post) =>
<div key={post.id}>
<Post post={post} friends={fake_friends} />
</div>)
)
}
</Stack>
</Box>
</Container>
<NavigationBar />
</Container>
<NavigationBar />
</div>
)

Expand Down

0 comments on commit 1fd4cd5

Please sign in to comment.