50cd18a926
* desktop onMouseEnter and leave handlers added * clicking nav option closes drawer * All AC met * removed dead bool * added hamburger to AppBar for mobile users small refactor * nuts and bolts working needs a lot of tidying though * Functionally complete. * change hardcode colors to theming * UI theme and border changes * bug fix removed collapse nav flicker * dead code * resetting drawer to closed onload * removal of hardcoded color * made null functions into optional props * Nested sx styling not global * paperprops now working * fixed breaking changes for DataGrid * linting fix * linting fix Co-authored-by: Aid Thompson <adrian@nymtech.net>
25 lines
547 B
TypeScript
25 lines
547 B
TypeScript
import * as React from 'react';
|
|
import { useMediaQuery } from '@mui/material';
|
|
import { useTheme } from '@mui/material/styles';
|
|
import { Nav } from './components/Nav';
|
|
import { MobileNav } from './components/MobileNav';
|
|
import { Routes } from './routes/index';
|
|
|
|
export const App: React.FC = () => {
|
|
const theme = useTheme();
|
|
const isMobile = useMediaQuery(theme.breakpoints.down('md'));
|
|
|
|
if (isMobile) {
|
|
return (
|
|
<MobileNav>
|
|
<Routes />
|
|
</MobileNav>
|
|
);
|
|
}
|
|
return (
|
|
<Nav>
|
|
<Routes />
|
|
</Nav>
|
|
);
|
|
};
|