Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update HTML components to MUI components for ManageProjects page #1850

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 29 additions & 6 deletions client/src/pages/ManageProjects.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,36 @@ import RecurringEventsApiService from '../api/RecurringEventsApiService';
import Loading from '../svg/22.gif';
import '../sass/ManageProjects.scss';
import EventsApiService_ from '../api/EventsApiService';
import { Box } from '@mui/material';

const PAGES = Object.freeze({
selectProject: 'selectProject',
editProjectInfo: 'editProjectInfo',
editMeetingTimes: 'editMeetingTimes',
});

// Added styles for MUI components
const loadingStyle = {
"display": "none",
"position": "absolute",
"display": "flex",
"flexDirection": "row",
"alignItems": "center",
"justifyContent": "center",
"zIndex": 1,
"top": 0,
"left": 0,
"right": 0,
"backgroundColor": "white",
"height": '100%',
"opacity": 0.6,
}

const noStyle = {
"opacity": 0,
"display": "none",
}

const ManageProjects = () => {
const { projectId } = useParams();
const { auth } = useAuth();
Expand Down Expand Up @@ -155,13 +178,13 @@ const ManageProjects = () => {
}
return (
<>
<span
className={`bg-overlay ${
eventsLoading || projectsLoading ? 'active' : ''
}`}
<Box
sx={eventsLoading || projectsLoading ? loadingStyle : noStyle}
component='span'
display='inline'
>
<img src={Loading} alt="Logo" />
</span>
<Box component='img' src={Loading} alt="Logo" />
</Box>
{displayedComponent}
</>
);
Expand Down
Loading