Skip to content

Commit e0105e8

Browse files
authored
Merge pull request #1742 from angela-lee1/update-to-mui-appjsx
update to mui appjsx
2 parents f5d7a2c + bc5b698 commit e0105e8

File tree

1 file changed

+34
-7
lines changed

1 file changed

+34
-7
lines changed

client/src/App.jsx

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import UserWelcome from './pages/UserWelcome';
3030
import UserPermissionSearch from './pages/UserPermissionSearch';
3131
import UserPermission from './pages/UserPermission';
3232

33-
import { ThemeProvider } from '@mui/material';
33+
import { Box, ThemeProvider } from '@mui/material';
3434
import theme from './theme';
3535

3636
import './App.scss';
@@ -93,20 +93,47 @@ const App = () => {
9393
return (
9494
<ThemeProvider theme={theme}>
9595
<AuthProvider>
96-
<div className="app">
97-
<div className="app-container">
96+
<Box
97+
sx={{
98+
height: '100%',
99+
width: '100vw',
100+
display: 'flex',
101+
justifyContent: 'center',
102+
alignItems: 'center',
103+
overflow: 'hidden',
104+
maxHeight: '90vh',
105+
margin: '5vh 0',
106+
}}
107+
>
108+
<Box
109+
sx={{
110+
position: 'relative',
111+
maxWidth: '500px',
112+
width: '100%',
113+
backgroundColor: 'white',
114+
overflow: 'hidden',
115+
borderRadius: '10px',
116+
padding: '15px',
117+
}}
118+
>
98119
<Navbar />
99-
<main role="main" className="main">
120+
<Box
121+
component="main"
122+
sx={{
123+
height: 'calc(90vh - 160px)',
124+
overflowY: 'scroll',
125+
}}
126+
>
100127
<Switch>
101128
{routes.map(({ path, Component }) => (
102129
<Route key={path} exact path={path} component={Component} />
103130
))}
104131
<Redirect to="/" />
105132
</Switch>
106-
</main>
133+
</Box>
107134
<Footer />
108-
</div>
109-
</div>
135+
</Box>
136+
</Box>
110137
</AuthProvider>
111138
</ThemeProvider>
112139
);

0 commit comments

Comments
 (0)