Skip to content

Commit

Permalink
migrate App.tsx to Mui 5 (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
AriaMoradi authored Nov 15, 2021
1 parent 2911844 commit eb4c1bf
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
Redirect,
} from 'react-router-dom';
import { QueryParamProvider } from 'use-query-params';
import { Container, useMediaQuery } from '@mui/material';
import { Container } from '@mui/material';
import CssBaseline from '@mui/material/CssBaseline';
import {
createTheme, ThemeProvider, Theme, StyledEngineProvider,
Expand Down Expand Up @@ -90,8 +90,6 @@ export default function App() {
}),
[darkTheme],
);
// this can only be used after the theme object is created
const isMobileWidth = useMediaQuery(theme.breakpoints.down('sm'));

return (
<Router>
Expand All @@ -105,10 +103,10 @@ export default function App() {
id="appMainContainer"
maxWidth={false}
disableGutters
style={{
marginTop: theme.spacing(8),
marginLeft: isMobileWidth ? '' : theme.spacing(8),
marginBottom: isMobileWidth ? theme.spacing(8) : '',
sx={{
mt: 8,
ml: { sm: 8 },
mb: { xs: 8, sm: 0 },
width: 'auto',
overflow: 'auto',
}}
Expand Down

0 comments on commit eb4c1bf

Please sign in to comment.