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 to mui appjsx #1742

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
43 changes: 35 additions & 8 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import HealthCheck from './pages/HealthCheck';
import SecretPassword from './pages/SecretPassword';
import UserWelcome from './pages/UserWelcome';

import { ThemeProvider } from '@mui/material';
import { Box, ThemeProvider } from '@mui/material';
import theme from './theme';

import './App.scss';
Expand All @@ -48,7 +48,7 @@ const routes = [
{ path: '/events', name: 'events', Component: Events },
{ path: '/useradmin', name: 'useradmin', Component: UserAdmin },
{ path: '/projects', name: 'projects', Component: ProjectList },
{ path: '/projects/create', name: 'projectform', Component: addProject},
{ path: '/projects/create', name: 'projectform', Component: addProject },
{
path: '/projects/:projectId',
name: 'project',
Expand All @@ -72,20 +72,47 @@ const App = () => {
return (
<ThemeProvider theme={theme}>
<AuthProvider>
<div className="app">
<div className="app-container">
<Box
sx={{
height: '100%',
width: '100vw',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
overflow: 'hidden',
maxHeight: '90vh',
margin: '5vh 0',
}}
>
<Box
sx={{
position: 'relative',
maxWidth: '500px',
width: '100%',
backgroundColor: 'white',
overflow: 'hidden',
borderRadius: '10px',
padding: '15px',
}}
>
<Navbar />
<main role="main" className="main">
<Box
component="main"
sx={{
height: 'calc(90vh - 160px)',
overflowY: 'scroll',
}}
>
<Switch>
{routes.map(({ path, Component }) => (
<Route key={path} exact path={path} component={Component} />
))}
<Redirect to="/" />
</Switch>
</main>
</Box>
<Footer />
</div>
</div>
</Box>
</Box>
</AuthProvider>
</ThemeProvider>
);
Expand Down
Loading