Skip to content

Commit

Permalink
fix(StudentFilter): Sticky on screen when scrolling.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZL-Asica committed Oct 10, 2024
1 parent 1fc9d18 commit f98955e
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions src/components/HomePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,25 @@ export default function HomePage() {
}

return (
<Box>
<StudentFilter
selectedMajors={selectedMajors}
setSelectedMajors={setSelectedMajors}
selectedYears={selectedYears}
setSelectedYears={setSelectedYears}
/>
<Box sx={{ display: 'flex', flexDirection: 'column' }}>
<Box
sx={{
position: 'sticky',
top: 60,
zIndex: 10,
backgroundColor: 'white',
boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.1)',
padding: 1,
marginBottom: 2,
}}
>
<StudentFilter
selectedMajors={selectedMajors}
setSelectedMajors={setSelectedMajors}
selectedYears={selectedYears}
setSelectedYears={setSelectedYears}
/>
</Box>
<StudentList
userProfile={userProfile}
requestedUsers={requestedUsers}
Expand Down

0 comments on commit f98955e

Please sign in to comment.