Skip to content

Commit f150cc0

Browse files
author
Megan Liu
committed
#1312: deleted unused code and import statements
1 parent 5575092 commit f150cc0

2 files changed

Lines changed: 2 additions & 16 deletions

File tree

src/frontend/src/pages/HomePage/UpcomingDeadlines.tsx

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { useAllWorkPackages } from '../../hooks/work-packages.hooks';
1414
import LoadingIndicator from '../../components/LoadingIndicator';
1515
import PageBlock from '../../layouts/PageBlock';
1616
import ErrorPage from '../ErrorPage';
17-
import { Grid, Typography, useTheme } from '@mui/material';
17+
import { Typography, useTheme } from '@mui/material';
1818
import WorkPackageCard from './WorkPackageCard';
1919

2020
const UpcomingDeadlines: React.FC = () => {
@@ -26,22 +26,8 @@ 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-
4229
const fullDisplay = (
4330
<Box
44-
id="container"
4531
sx={{
4632
display: 'flex',
4733
flexDirection: 'row',

src/frontend/src/pages/HomePage/WorkPackagesByTimelineStatus.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { timelinePipe } from '../../utils/pipes';
1111
import LoadingIndicator from '../../components/LoadingIndicator';
1212
import PageBlock from '../../layouts/PageBlock';
1313
import ErrorPage from '../ErrorPage';
14-
import { FormControl, Grid, InputLabel, MenuItem, Select, useTheme } from '@mui/material';
14+
import { FormControl, InputLabel, MenuItem, Select, useTheme } from '@mui/material';
1515
import WorkPackageCard from './WorkPackageCard';
1616

1717
const WorkPackagesByTimelineStatus: React.FC = () => {

0 commit comments

Comments
 (0)