File tree Expand file tree Collapse file tree
src/frontend/src/pages/HomePage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,8 +26,22 @@ const UpcomingDeadlines: React.FC = () => {
2626 return < ErrorPage message = { workPackages . error . message } error = { workPackages . error } /> ;
2727 }
2828
29+ window . addEventListener ( 'load' , checkOverflow ) ;
30+ window . addEventListener ( 'resize' , checkOverflow ) ;
31+
32+ const container = document . getElementById ( 'container' ) ;
33+ const content = container ?. querySelector ( '.content' ) ;
34+
35+ function checkOverflow ( ) {
36+ if ( container !== null && container !== undefined && content !== null && content !== undefined ) {
37+ const hasOverflow = content . scrollHeight > container . clientHeight || content . scrollWidth > container . scrollWidth ;
38+ container . style . overflow = hasOverflow ? 'scroll' : 'auto' ;
39+ }
40+ }
41+
2942 const fullDisplay = (
3043 < Box
44+ id = "container"
3145 sx = { {
3246 display : 'flex' ,
3347 flexDirection : 'row' ,
@@ -78,7 +92,7 @@ const UpcomingDeadlines: React.FC = () => {
7892 </ FormControl >
7993 }
8094 >
81- < Grid container > { workPackages . isLoading ? < LoadingIndicator /> : fullDisplay } </ Grid >
95+ { workPackages . isLoading ? < LoadingIndicator /> : fullDisplay }
8296 </ PageBlock >
8397 ) ;
8498} ;
You can’t perform that action at this time.
0 commit comments